public
Created — forked from /gist:4411132

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
$ irb
1.9.3p327 :001 > logfile = File.new('some_file.txt', 'w')
=> #<File:some_file.txt>
1.9.3p327 :002 > logfile.write("my content")
=> 10
1.9.3p327 :003 > quit
$ cat some_file.txt
my content
$ irb
1.9.3p327 :001 > logfile = File.new('some_file.txt', 'w')
=> #<File:some_file.txt>
1.9.3p327 :002 > logfile.write("something else")
=> 14
1.9.3p327 :003 > quit
$ cat some_file.txt
something else

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.