diff options
Diffstat (limited to 'test/ruby/test_argf.rb')
-rw-r--r-- | test/ruby/test_argf.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index 3c9b1c63fc..e3bd1cd075 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -1121,5 +1121,12 @@ class TestArgf < Test::Unit::TestCase ruby('-e', "print ARGF.read(3)", @t1.path, @t2.path, @t3.path) do |f| assert_equal("abc", f.read) end + + argf = ARGF.class.new(@t1.path, @t2.path, @t3.path) + begin + assert_equal("abc", argf.read(3)) + ensure + argf.close + end end end |