diff options
author | Ernie Miller <ernie@metautonomo.us> | 2010-04-24 08:02:47 -0400 |
---|---|---|
committer | Ernie Miller <ernie@metautonomo.us> | 2010-05-07 13:08:31 -0400 |
commit | 5afed6d45def1e72df24679a746cbe96b52c1709 (patch) | |
tree | 50c8ab67f97c3aeba71046cb397f5e3f572c606b /lib/arel/algebra | |
parent | acdb9ea3036466b6553c85486f8fdfc5909f1275 (diff) | |
download | rails-5afed6d45def1e72df24679a746cbe96b52c1709.tar.gz rails-5afed6d45def1e72df24679a746cbe96b52c1709.tar.bz2 rails-5afed6d45def1e72df24679a746cbe96b52c1709.zip |
Inequality shouldn't descend from equality, due to Rails type checks, and resolve conflicts from rebase
Diffstat (limited to 'lib/arel/algebra')
-rw-r--r-- | lib/arel/algebra/predicates.rb | 8 |
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 |