diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-02 02:02:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-02 02:02:00 +0000 |
commit | 130a077f74031a16430ec8b20955b9e57f75397c (patch) | |
tree | 7e08ff6964b2d577d20755e48fa5c9bacba6de0a | |
parent | d80c73d60f9ac867c79b28027236a3dc5668e411 (diff) | |
download | ruby-130a077f74031a16430ec8b20955b9e57f75397c.tar.gz |
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.rb | 8 |
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 |