aboutsummaryrefslogtreecommitdiffstats
path: root/test/io
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-22 22:25:19 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-22 22:25:19 +0000
commit6395e405080bcc136c0a9384c5a0524632e67e3d (patch)
tree8d5f2335c27a4c204d7d73687a5debb1ea123ef0 /test/io
parent3d0c51affc5a7470460c9eb9971e1c7dfa0defc0 (diff)
downloadruby-6395e405080bcc136c0a9384c5a0524632e67e3d.tar.gz
test/io/wait/test_io_wait.rb (test_wait_eof): test return value
I wrote some code which relies on this nowadays, but Ruby <=2.2 and earlier behaved differently... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io')
-rw-r--r--test/io/wait/test_io_wait.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb
index 48f6cf5c20..bef4731ae5 100644
--- a/test/io/wait/test_io_wait.rb
+++ b/test/io/wait/test_io_wait.rb
@@ -70,9 +70,11 @@ class TestIOWait < Test::Unit::TestCase
def test_wait_eof
th = Thread.new { sleep 0.01; @w.close }
+ ret = nil
assert_nothing_raised(Timeout::Error) do
- Timeout.timeout(0.1) {@r.wait}
+ Timeout.timeout(0.1) { ret = @r.wait }
end
+ assert_equal @r, ret
ensure
th.join
end