aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2011-04-12 00:23:07 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-12 00:23:07 +0200
commitd1575ae1b9658c91145d6a46ec2a144a5a089207 (patch)
treed630cd4ba2cd512c3be56e33d4e7b45e0cf8fff4 /activeresource
parent5918b868b24ff384365d436367611aea577f3723 (diff)
downloadrails-d1575ae1b9658c91145d6a46ec2a144a5a089207.tar.gz
rails-d1575ae1b9658c91145d6a46ec2a144a5a089207.tar.bz2
rails-d1575ae1b9658c91145d6a46ec2a144a5a089207.zip
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/connection.rb2
-rw-r--r--activeresource/test/cases/http_mock_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index 09d0659b43..e286362f87 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -278,7 +278,7 @@ module ActiveResource
def legitimize_auth_type(auth_type)
return :basic if auth_type.nil?
auth_type = auth_type.to_sym
- auth_type.either?(:basic, :digest) ? auth_type : :basic
+ auth_type.among?(:basic, :digest) ? auth_type : :basic
end
end
end
diff --git a/activeresource/test/cases/http_mock_test.rb b/activeresource/test/cases/http_mock_test.rb
index 542ce38ba3..dfb097315e 100644
--- a/activeresource/test/cases/http_mock_test.rb
+++ b/activeresource/test/cases/http_mock_test.rb
@@ -193,7 +193,7 @@ class HttpMockTest < ActiveSupport::TestCase
end
def request(method, path, headers = {}, body = nil)
- if method.either?(:put, :post)
+ if method.among?(:put, :post)
@http.send(method, path, body, headers)
else
@http.send(method, path, headers)