Skip to content
Snippets Groups Projects
Commit 6b2dbb82 authored by Olek Janiszewski's avatar Olek Janiszewski
Browse files

Fix ambiguous argument warnings

parent 3ddf1af1
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ module Geocoder ...@@ -64,7 +64,7 @@ module Geocoder
# that have non-nil values. # that have non-nil values.
# #
def keys def keys
store.keys.select{ |k| k.match /^#{prefix}/ and interpret(store[k]) } store.keys.select{ |k| k.match(/^#{prefix}/) and interpret(store[k]) }
end end
## ##
......
...@@ -50,7 +50,7 @@ module Geocoder::Lookup ...@@ -50,7 +50,7 @@ module Geocoder::Lookup
# to warning message. # to warning message.
# #
def parse_raw_data(raw_data) def parse_raw_data(raw_data)
if raw_data.match /^<\?xml/ if raw_data.match(/^<\?xml/)
if raw_data.include?("Rate Limit Exceeded") if raw_data.include?("Rate Limit Exceeded")
raise_error(Geocoder::OverQueryLimitError) || warn("Over API query limit.") raise_error(Geocoder::OverQueryLimitError) || warn("Over API query limit.")
elsif raw_data =~ /<yahoo:description>(Please provide valid credentials.*)<\/yahoo:description>/i elsif raw_data =~ /<yahoo:description>(Please provide valid credentials.*)<\/yahoo:description>/i
......
...@@ -219,7 +219,7 @@ module Geocoder::Store ...@@ -219,7 +219,7 @@ module Geocoder::Store
end end
def using_sqlite? def using_sqlite?
connection.adapter_name.match /sqlite/i connection.adapter_name.match(/sqlite/i)
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