End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Resolv::Hosts#getaddress
getaddress(name)
lib/resolv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/resolv.rb, line 218
def getaddress(name)
each_address(name) {|address| return address}
raise ResolvError.new("#{@filename} has no name: #{name}")
end
Gets the IP address of name from the hosts file.