require 'open-uri'

page = URI.parse("http://www.whatismyip.com")

html = page.read

ip = html.scan(/.*?([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9] 
{1,3}).*/).flatten.first



Tada!

-Joel