Skip to content
Snippets Groups Projects
Commit e64151ae authored by Alex Reisner's avatar Alex Reisner
Browse files

Remove deprecation warnings.

...for array methods mistakenly called on a Result object. This is no
longer likely to be a problem now that Geocoder.search returns an array.
parent 565de2aa
No related branches found
No related tags found
No related merge requests found
...@@ -39,20 +39,6 @@ module Geocoder ...@@ -39,20 +39,6 @@ module Geocoder
def country_code def country_code
fail fail
end end
def [](i)
if i == 0
warn "DEPRECATION WARNING: You called '[0]' on a Geocoder::Result object. Geocoder.search(...) now returns a single result instead of an array so this is no longer necessary. This warning will be removed and an error will result in geocoder 1.0."
elsif i.is_a?(Fixnum)
warn "DEPRECATION WARNING: You tried to access a Geocoder result but Geocoder.search(...) now returns a single result instead of an array. This warning will be removed and an error will result in geocoder 1.0."
end
self
end
def first
warn "DEPRECATION WARNING: You called '.first' on a Geocoder::Result object. Geocoder.search(...) now returns a single result instead of an array so this is no longer necessary. This warning will be removed and an error will result in geocoder 1.0."
self
end
end end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment