diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-11 19:41:49 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-11 19:41:49 +0000 |
commit | afe296be78048b491740b3ec360481db8f6e7659 (patch) | |
tree | 0a344f66f1bf0d33e4ce227f8b45976387b57787 /test/resolv/test_mdns.rb | |
parent | 82a97145302248f4c7a7ee792f9673257ed23655 (diff) | |
download | ruby-afe296be78048b491740b3ec360481db8f6e7659.tar.gz |
fix for IPv6 env
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/resolv/test_mdns.rb')
-rw-r--r-- | test/resolv/test_mdns.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/resolv/test_mdns.rb b/test/resolv/test_mdns.rb index 9c17f9b219..ff66276f9a 100644 --- a/test/resolv/test_mdns.rb +++ b/test/resolv/test_mdns.rb @@ -12,15 +12,16 @@ class TestResolvMDNS < Test::Unit::TestCase yield typeclass.new("::1") end end + addrs = mdns.__send__(:use_ipv6?) ? ["127.0.0.1", "::1"] : ["127.0.0.1"] [ ["example.com", []], - ["foo.local", ["127.0.0.1"]], + ["foo.local", addrs], ].each do |name, expect| results = [] mdns.each_address(name) do |result| results << result.to_s end - assert_equal expect, results, "GH-1484" + assert_equal expect, results.sort, "GH-1484" end end end |