ruby-changes:49662
From: naruse <ko1@a...>
Date: Fri, 12 Jan 2018 04:41:54 +0900 (JST)
Subject: [ruby-changes:49662] naruse:r61778 (trunk): fix for IPv6 env
naruse 2018-01-12 04:41:49 +0900 (Fri, 12 Jan 2018) New Revision: 61778 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61778 Log: fix for IPv6 env Modified files: trunk/test/resolv/test_mdns.rb Index: test/resolv/test_mdns.rb =================================================================== --- test/resolv/test_mdns.rb (revision 61777) +++ test/resolv/test_mdns.rb (revision 61778) @@ -12,15 +12,16 @@ class TestResolvMDNS < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/resolv/test_mdns.rb#L12 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/