aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/predicates.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/algebra/predicates.rb')
-rw-r--r--lib/arel/algebra/predicates.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/arel/algebra/predicates.rb b/lib/arel/algebra/predicates.rb
index 5e17cdd101..d789c1d8a2 100644
--- a/lib/arel/algebra/predicates.rb
+++ b/lib/arel/algebra/predicates.rb
@@ -145,7 +145,13 @@ module Arel
end
end
- class Inequality < Equality
+ class Inequality < Binary
+ def ==(other)
+ Equality === other and
+ ((operand1 == other.operand1 and operand2 == other.operand2) or
+ (operand1 == other.operand2 and operand2 == other.operand1))
+ end
+
def complement
Equality.new(operand1, operand2)
end