diff options
author | Prem Sichanugrist <s@sikachu.com> | 2011-04-13 00:04:40 +0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-13 20:25:28 +0800 |
commit | 733bfa63f5d8d3b963202b6d3e9f00b4db070b91 (patch) | |
tree | 10febe66946c850ce8e6bc0c9560d55d83b7a608 /activeresource | |
parent | 1f869114f5f671160653eb6f15d2850d82217fe5 (diff) | |
download | rails-733bfa63f5d8d3b963202b6d3e9f00b4db070b91.tar.gz rails-733bfa63f5d8d3b963202b6d3e9f00b4db070b91.tar.bz2 rails-733bfa63f5d8d3b963202b6d3e9f00b4db070b91.zip |
Remove `#among?` from Active Support
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
Diffstat (limited to 'activeresource')
-rw-r--r-- | activeresource/lib/active_resource/connection.rb | 2 | ||||
-rw-r--r-- | activeresource/test/cases/http_mock_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index e286362f87..765575d866 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.among?(:basic, :digest) ? auth_type : :basic + auth_type.in?([: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 dfb097315e..cd5155924a 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.among?(:put, :post) + if method.in?([:put, :post]) @http.send(method, path, body, headers) else @http.send(method, path, headers) |