diff --git a/lib/geocoder/results/yahoo.rb b/lib/geocoder/results/yahoo.rb index 3f964fa250d84caf9bc8bf33dc6e1b6f6681c897..ffbf3f71cc013562706111985802460ac47aa540 100644 --- a/lib/geocoder/results/yahoo.rb +++ b/lib/geocoder/results/yahoo.rb @@ -8,7 +8,7 @@ module Geocoder::Result end def address(format = :full) - (1..3).to_a.map{ |i| @data["line#{i}"] }.reject{ |i| i.nil? or i == "" }.join(", ") + (1..4).to_a.map{ |i| @data["line#{i}"] }.reject{ |i| i.nil? or i == "" }.join(", ") end def self.response_attributes diff --git a/test/geocoder_test.rb b/test/geocoder_test.rb index 4dfa26e5183f01c9dad0f965e2fc7bb2ff18f07f..6b6042caa3697df1eae1e3d70389d21505de9438 100644 --- a/test/geocoder_test.rb +++ b/test/geocoder_test.rb @@ -58,7 +58,7 @@ class GeocoderTest < Test::Unit::TestCase Geocoder::Configuration.lookup = :yahoo Geocoder.send :set_lookup, :yahoo results = Geocoder.search("Madison Square Garden, New York, NY") - assert_equal "Madison Square Garden, New York, NY 10001", + assert_equal "Madison Square Garden, New York, NY 10001, United States", results.first.address end end