From b5bcb8b11d7b95309a63a6dde07227007e22217e Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 20 Jul 2010 16:19:16 -0700 Subject: comparing children directly --- lib/arel/algebra/predicates.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/arel/algebra/predicates.rb b/lib/arel/algebra/predicates.rb index df2618a148..f7c6ee599f 100644 --- a/lib/arel/algebra/predicates.rb +++ b/lib/arel/algebra/predicates.rb @@ -43,7 +43,7 @@ module Arel end def ==(other) - same_elements?(@predicates, other.predicates) + super || children == other.children end def bind(relation) @@ -51,13 +51,6 @@ module Arel *predicates.map {|p| p.find_correlate_in(relation)} ) end - - private - - def same_elements?(a1, a2) - a1.inject({}) { |h,e| h[e] = a1.count(e); h } == - a2.inject({}) { |h,e| h[e] = a2.count(e); h } - end end class Any < Polyadic -- cgit v1.2.3