End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Resolv::DNS#each_address
each_address(name) { |address| ... }
lib/resolv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/resolv.rb, line 401
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
end
Iterates over all IP addresses for name retrieved from the DNS resolver.
name can be a Resolv::DNS::Name or a String. Retrieved addresses will be a Resolv::IPv4 or Resolv::IPv6