From 7c34548fe0c7c5078fe9672e236630597be50d13 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Mon, 2 Mar 2015 11:32:35 +0800 Subject: Use include? instead of in? for Enumerable#without. [egilburg] --- activesupport/lib/active_support/core_ext/enumerable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3