diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 8a5b878f3b..42614e00cb 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1270,6 +1270,16 @@ class TestIO < Test::Unit::TestCase assert_equal("foo\n", f.gets) } end + + open(__FILE__) do |f| + f.gets + f2 = open(t.path) + f2.gets + assert_nothing_raised { + f.reopen(f2) + assert_equal("bar\n", f.gets, '[ruby-core:24240]') + } + end end def test_foreach |