Created
December 30, 2012 05:24
-
-
Save anonymous/4411132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment