From d4162053410782a449e0921ee7222e7ce3deca6f Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Sat, 15 Oct 2022 01:45:51 +1300 Subject: Copy `IO#timeout` on `IO#dup`. (#6546) --- test/ruby/test_io.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 0c8beb2f95..989c4c8991 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1441,6 +1441,14 @@ class TestIO < Test::Unit::TestCase End end + def test_dup_timeout + with_pipe do |r, w| + r.timeout = 0.1 + r2 = r.dup + assert_equal(0.1, r2.timeout) + end + end + def test_inspect with_pipe do |r, w| assert_match(/^#$/, r.inspect) -- cgit v1.2.3