aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_addrinfo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_addrinfo.rb')
-rw-r--r--test/socket/test_addrinfo.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb
index 4c3babdfa8..77ef0ae321 100644
--- a/test/socket/test_addrinfo.rb
+++ b/test/socket/test_addrinfo.rb
@@ -444,7 +444,7 @@ class TestSocketAddrinfo < Test::Unit::TestCase
assert_equal(ai1.canonname, ai2.canonname)
end
- if Socket.const_defined?("AF_INET6")
+ if Socket.const_defined?("AF_INET6") && Socket::AF_INET6.is_a?(Integer)
def test_addrinfo_new_inet6
ai = Addrinfo.new(["AF_INET6", 42304, "ip6-localhost", "::1"])