aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb2
-rw-r--r--activesupport/test/core_ext/enumerable_test.rb1
2 files changed, 1 insertions, 2 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
diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb
index c8123a022a..e5d8ae7882 100644
--- a/activesupport/test/core_ext/enumerable_test.rb
+++ b/activesupport/test/core_ext/enumerable_test.rb
@@ -1,7 +1,6 @@
require 'abstract_unit'
require 'active_support/core_ext/array'
require 'active_support/core_ext/enumerable'
-require 'active_support/core_ext/object/inclusion'
Payment = Struct.new(:price)
class SummablePayment < Payment