From 21f2c194bbf781d9228584f3e93f4a93b33f5632 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 2 Jun 2015 02:02:00 +0000 Subject: 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 --- test/socket/test_nonblock.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/socket') 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 -- cgit v1.2.3