aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/predicates.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/predicates.rb')
-rw-r--r--lib/arel/predicates.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/arel/predicates.rb b/lib/arel/predicates.rb
index b375f37ff4..f21376d4c9 100644
--- a/lib/arel/predicates.rb
+++ b/lib/arel/predicates.rb
@@ -1,8 +1,5 @@
module Arel
class Predicate
- def ==(other)
- self.class == other.class
- end
end
class Binary < Predicate
@@ -13,7 +10,9 @@ module Arel
end
def ==(other)
- super and @operand1 == other.operand1 and @operand2 == other.operand2
+ self.class === other and
+ @operand1 == other.operand1 and
+ @operand2 == other.operand2
end
def bind(relation)
@@ -28,7 +27,7 @@ module Arel
class Equality < Binary
def ==(other)
- Equality == other.class and
+ Equality === other and
((operand1 == other.operand1 and operand2 == other.operand2) or
(operand1 == other.operand2 and operand2 == other.operand1))
end