diff options
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 1b8179b516..ecf5658d22 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3553,4 +3553,16 @@ __END__ } end if IO.method_defined?(:pread) and IO.method_defined?(:pwrite) end + + def test_select_exceptfds + TCPServer.open('localhost', 0) do |svr| + con = TCPSocket.new('localhost', svr.addr[1]) + acc = svr.accept + assert_equal 6, con.send('hello', Socket::MSG_OOB) + set = IO.select(nil, nil, [acc], 30) + assert_equal([[], [], [acc]], set, 'IO#select exceptions array OK') + acc.close + con.close + end + end if Socket.const_defined?(:MSG_OOB) end |