From b364cb1083f4e9d7a9e313e5de1174046bcfcbd4 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Sun, 2 Nov 2014 12:00:04 -0700 Subject: Look for `Enumerable` rather than `Array` in predicates It's not quite duck typed, but it will allow us to pass in our own objects with additional logic (like type casting). --- lib/arel/predications.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/arel/predications.rb') diff --git a/lib/arel/predications.rb b/lib/arel/predications.rb index f11f8dc86d..ec779dd40f 100644 --- a/lib/arel/predications.rb +++ b/lib/arel/predications.rb @@ -55,7 +55,7 @@ Passing a range to `#in` is deprecated. Call `#between`, instead. eowarn end between(other) - when Array + when Enumerable Nodes::In.new self, quoted_array(other) else Nodes::In.new self, quoted_node(other) @@ -103,7 +103,7 @@ Passing a range to `#not_in` is deprecated. Call `#not_between`, instead. eowarn end not_between(other) - when Array + when Enumerable Nodes::NotIn.new self, quoted_array(other) else Nodes::NotIn.new self, quoted_node(other) -- cgit v1.2.3