summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 02:02:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 02:02:00 +0000
commit21f2c194bbf781d9228584f3e93f4a93b33f5632 (patch)
tree7e08ff6964b2d577d20755e48fa5c9bacba6de0a
parent18e7743817250a8ccaf6134a612d0fa3922e8857 (diff)
test_nonblock.rb: skip if EPROTONOSUPPORT
* test/socket/test_nonblock.rb (test_sendmsg_nonblock_seqpacket): OSX raises EPROTONOSUPPORT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 4b1f209..8086c38 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