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:
parent
ac2f601e26
commit
6e181393c6
1 changed files with 5 additions and 2 deletions
|
|
@ -240,9 +240,12 @@ class TestSocket < Test::Unit::TestCase
|
||||||
unix_server = Socket.unix_server_socket("#{tmpdir}/sock")
|
unix_server = Socket.unix_server_socket("#{tmpdir}/sock")
|
||||||
tcp_servers.each {|s|
|
tcp_servers.each {|s|
|
||||||
addr = s.connect_address
|
addr = s.connect_address
|
||||||
assert_nothing_raised("connect to #{addr.inspect}") {
|
begin
|
||||||
clients << addr.connect
|
clients << addr.connect
|
||||||
}
|
rescue
|
||||||
|
# allow failure if the address is IPv6
|
||||||
|
raise unless addr.ipv6?
|
||||||
|
end
|
||||||
}
|
}
|
||||||
addr = unix_server.connect_address
|
addr = unix_server.connect_address
|
||||||
assert_nothing_raised("connect to #{addr.inspect}") {
|
assert_nothing_raised("connect to #{addr.inspect}") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue