aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_udp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_udp.rb')
-rw-r--r--test/socket/test_udp.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/socket/test_udp.rb b/test/socket/test_udp.rb
index bec2181918..f060b65f2c 100644
--- a/test/socket/test_udp.rb
+++ b/test/socket/test_udp.rb
@@ -20,9 +20,13 @@ class TestSocket_UDPSocket < Test::Unit::TestCase
assert_match(/AF_INET\b/, sock.inspect)
}
if Socket.const_defined?(:AF_INET6)
- UDPSocket.open(Socket::AF_INET6) {|sock|
- assert_match(/AF_INET6\b/, sock.inspect)
- }
+ begin
+ UDPSocket.open(Socket::AF_INET6) {|sock|
+ assert_match(/AF_INET6\b/, sock.inspect)
+ }
+ rescue Errno::EAFNOSUPPORT
+ skip 'AF_INET6 not supported by kernel'
+ end
end
end