summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 6e6a27f015..313fc0c864 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1038,6 +1038,14 @@ class TestIO < Test::Unit::TestCase
safe_4 { r.reopen(t.path) }
end
end
+
+ open(__FILE__) do |f|
+ f.gets
+ assert_nothing_raised {
+ f.reopen(t.path)
+ assert_equal("foo\n", f.gets)
+ }
+ end
end
def test_foreach