Get all the addresses associated with a hostname
require 'resolv' Resolv.each_address("http://www.google.com/") do |ip| puts ip end