зеркало из https://github.com/github/ruby.git
each_address should now resolve for AAAA first
AAAA over A is standards track behaviour as per RFC 6724.
This commit is contained in:
Родитель
4cd893b048
Коммит
1b3f18afce
|
@ -396,10 +396,10 @@ class Resolv
|
|||
# be a Resolv::IPv4 or Resolv::IPv6
|
||||
|
||||
def each_address(name)
|
||||
each_resource(name, Resource::IN::A) {|resource| yield resource.address}
|
||||
if use_ipv6?
|
||||
each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address}
|
||||
end
|
||||
each_resource(name, Resource::IN::A) {|resource| yield resource.address}
|
||||
end
|
||||
|
||||
def use_ipv6? # :nodoc:
|
||||
|
|
Загрузка…
Ссылка в новой задаче