1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ignore exception is the address is IPv6

some environments disables IPv6 even if they have IPv6 addresses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2015-12-24 17:53:11 +00:00
parent ac2f601e26
commit 6e181393c6

View file

@ -240,9 +240,12 @@ class TestSocket < Test::Unit::TestCase
unix_server = Socket.unix_server_socket("#{tmpdir}/sock")
tcp_servers.each {|s|
addr = s.connect_address
assert_nothing_raised("connect to #{addr.inspect}") {
begin
clients << addr.connect
}
rescue
# allow failure if the address is IPv6
raise unless addr.ipv6?
end
}
addr = unix_server.connect_address
assert_nothing_raised("connect to #{addr.inspect}") {