aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman@gmail.com>2015-03-01 23:00:08 -0600
committerRichard Schneeman <richard.schneeman@gmail.com>2015-03-01 23:00:08 -0600
commitc34a5bff94e2af111f7c7f8f0bce8f94e1fd798b (patch)
tree5c9c2939bc4ecb620efcac58baa0df25043e04d2 /activesupport/lib
parent485e125668cb3a3d5523dcef78e5155ea1957d9e (diff)
parent7c34548fe0c7c5078fe9672e236630597be50d13 (diff)
downloadrails-c34a5bff94e2af111f7c7f8f0bce8f94e1fd798b.tar.gz
rails-c34a5bff94e2af111f7c7f8f0bce8f94e1fd798b.tar.bz2
rails-c34a5bff94e2af111f7c7f8f0bce8f94e1fd798b.zip
Merge pull request #19163 from JuanitoFatas/feautre/enumerable-without-take-2
Use include? instead of in? for Enumerable#without.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb
index d699cf4241..7a893292b3 100644
--- a/activesupport/lib/active_support/core_ext/enumerable.rb
+++ b/activesupport/lib/active_support/core_ext/enumerable.rb
@@ -69,7 +69,7 @@ module Enumerable
# {foo: 1, bar: 2, baz: 3}.without :bar
# => {foo: 1, baz: 3}
def without(*elements)
- reject { |element| element.in?(elements) }
+ reject { |element| elements.include?(element) }
end
end