From 5afed6d45def1e72df24679a746cbe96b52c1709 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Sat, 24 Apr 2010 08:02:47 -0400 Subject: Inequality shouldn't descend from equality, due to Rails type checks, and resolve conflicts from rebase --- lib/arel/algebra/predicates.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/arel/algebra') 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 -- cgit v1.2.3