mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
d737d5765d
commit
d4fd2fb0a3
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Oct 23 07:17:11 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* test/io/wait/test_io_wait.rb (test_wait_eof): test return value
|
||||
|
||||
Fri Oct 23 00:32:02 2015 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/openssl/ossl_ssl.c (ssl_npn_select_cb): explicitly raise error
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue