lib/dbee/model/constraints/base.rb in dbee-1.0.3 vs lib/dbee/model/constraints/base.rb in dbee-1.1.0

- old
+ new

@@ -20,18 +20,20 @@ @name = name.to_s @parent = parent.to_s end def <=>(other) - "#{name}#{parent}" <=> "#{other.name}#{other.parent}" + "#{self.class.name}#{name}#{parent}" <=> "#{other.class.name}#{other.name}#{other.parent}" end def hash - "#{name}#{parent}".hash + "#{self.class.name}#{name}#{parent}".hash end def ==(other) - other.name == name && other.parent == parent + other.instance_of?(self.class) && + other.name == name && + other.parent == parent end alias eql? == end end end