summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/socket/test_nonblock.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/socket/test_nonblock.rb b/test/socket/test_nonblock.rb
index 4b1f209907..8086c38e88 100644
--- a/test/socket/test_nonblock.rb
+++ b/test/socket/test_nonblock.rb
@@ -275,16 +275,16 @@ class TestSocketNonblock < Test::Unit::TestCase
}
end
- def test_sendmsg_nonblock_seqpacket
- if defined?(UNIXSocket) && defined?(Socket::SOCK_SEQPACKET)
+ if defined?(UNIXSocket) && defined?(Socket::SOCK_SEQPACKET)
+ def test_sendmsg_nonblock_seqpacket
buf = '*' * 10000
UNIXSocket.pair(:SEQPACKET) do |s1, s2|
assert_raises(IO::WaitWritable) do
loop { s1.sendmsg_nonblock(buf) }
end
end
- else
- skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform"
+ rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
+ skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
end
end