Fix geolocation to actually work...
authorTom Hughes <tom@compton.nu>
Fri, 12 Oct 2007 16:34:38 +0000 (16:34 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 12 Oct 2007 16:34:38 +0000 (16:34 +0000)
lib/osm.rb

index 45c506e2e9d75882aaf06a125f3f04c6f52f6b20..0f059ce98c48e22037edcef112f850647a1a7353 100644 (file)
@@ -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|