1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Assert for duplicated ARGF [Bug #18074]

This commit is contained in:
Nobuyoshi Nakada 2021-08-10 22:06:43 +09:00
parent 7de7e9fdb7
commit c3964a313e
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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