diff --git a/lib/geocoder/cache.rb b/lib/geocoder/cache.rb index 05bf5bb51655b00a57d5763dbad1ce44783873fd..fe2794db48f25805de64ebc681d506c1103670a7 100644 --- a/lib/geocoder/cache.rb +++ b/lib/geocoder/cache.rb @@ -64,7 +64,7 @@ module Geocoder # that have non-nil values. # 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 ## diff --git a/lib/geocoder/lookups/yahoo.rb b/lib/geocoder/lookups/yahoo.rb index beff6c8830f352307e368610d64c4759253fd48f..2b80100c3f5cafd3bc15a87f2a3a18c413a1681c 100644 --- a/lib/geocoder/lookups/yahoo.rb +++ b/lib/geocoder/lookups/yahoo.rb @@ -50,7 +50,7 @@ module Geocoder::Lookup # to warning message. # def parse_raw_data(raw_data) - if raw_data.match /^<\?xml/ + if raw_data.match(/^<\?xml/) if raw_data.include?("Rate Limit Exceeded") raise_error(Geocoder::OverQueryLimitError) || warn("Over API query limit.") elsif raw_data =~ /<yahoo:description>(Please provide valid credentials.*)<\/yahoo:description>/i diff --git a/lib/geocoder/stores/active_record.rb b/lib/geocoder/stores/active_record.rb index 7c48653a1842f946495aa929abb4d6df5b776b6c..38d0abc03f050d0bb08c5ff799e59089c39298f1 100644 --- a/lib/geocoder/stores/active_record.rb +++ b/lib/geocoder/stores/active_record.rb @@ -219,7 +219,7 @@ module Geocoder::Store end def using_sqlite? - connection.adapter_name.match /sqlite/i + connection.adapter_name.match(/sqlite/i) end ##