From f82f362cea0c044a96da1dfd801d5e4b0196ac32 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 12 Oct 2007 16:34:38 +0000 Subject: [PATCH] Fix geolocation to actually work... --- lib/osm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/osm.rb b/lib/osm.rb index 45c506e2e..0f059ce98 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -374,7 +374,7 @@ module OSM Timeout::timeout(4) do Net::HTTP.start('api.hostip.info') do |http| country = http.get("/country.php?ip=#{ip_address}").body - country = "GB" if country = "UK" + country = "GB" if country == "UK" Net::HTTP.start('ws.geonames.org') do |http| xml = REXML::Document.new(http.get("/countryInfo?country=#{country}").body) xml.elements.each("geonames/country") do |ele| -- 2.39.5