mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/io/nonblock/test_flush.rb: Close fds.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a1afdfeb06
commit
a2f9b00ad4
1 changed files with 8 additions and 3 deletions
|
@ -7,9 +7,14 @@ end
|
|||
|
||||
class TestIONonblock < Test::Unit::TestCase
|
||||
def test_flush
|
||||
flush_test(*IO.pipe) or
|
||||
(require 'socket'; flush_test(*Socket.pair(:INET, :STREAM))) or
|
||||
skip "nonblocking IO did not work"
|
||||
IO.pipe {|r, w|
|
||||
return if flush_test(r, w)
|
||||
}
|
||||
require 'socket';
|
||||
Socket.pair(:INET, :STREAM) {|s1, s2|
|
||||
return if flush_test(s1, s2)
|
||||
}
|
||||
skip "nonblocking IO did not work"
|
||||
end
|
||||
|
||||
def flush_test(r, w)
|
||||
|
|
Loading…
Reference in a new issue