Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kronos
Created April 29, 2010 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kronos/383293 to your computer and use it in GitHub Desktop.
Save kronos/383293 to your computer and use it in GitHub Desktop.
diff --git a/kernel/common/io.rb b/kernel/common/io.rb
index 8319599..4fd1fab 100644
--- a/kernel/common/io.rb
+++ b/kernel/common/io.rb
@@ -1390,7 +1390,7 @@ class IO
# f2.readlines[0] #=> "This is line one\n"
# f2.reopen(f1) #=> #<File:testfile>
# f2.readlines[0] #=> "This is line one\n"
- def reopen(other, mode="r+")
+ def reopen(other, mode="a+")
if other.respond_to? :to_io
flush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment