From 6b2dbb82eb711cfe43bbcf116f4727b174d6920e Mon Sep 17 00:00:00 2001
From: Olek Janiszewski <olek.janiszewski@gmail.com>
Date: Sun, 23 Feb 2014 13:17:38 +0100
Subject: [PATCH] Fix ambiguous argument warnings

---
 lib/geocoder/cache.rb                | 2 +-
 lib/geocoder/lookups/yahoo.rb        | 2 +-
 lib/geocoder/stores/active_record.rb | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/geocoder/cache.rb b/lib/geocoder/cache.rb
index 05bf5bb5..fe2794db 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 beff6c88..2b80100c 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 7c48653a..38d0abc0 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
 
       ##
-- 
GitLab