diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 989c4c8991..6313e11179 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1446,6 +1446,8 @@ class TestIO < Test::Unit::TestCase r.timeout = 0.1 r2 = r.dup assert_equal(0.1, r2.timeout) + ensure + r2&.close end end