lib/treequel/branch.rb in treequel-1.8.0 vs lib/treequel/branch.rb in treequel-1.8.1

- old
+ new

@@ -442,10 +442,16 @@ ### Comparison-by-value method -- returns +true+ if the receiver has the same DN as ### +other+. def eql?( other ) return false unless other.class.eql?( self.class ) - return self.dn == other.dn + return self.hash == other.hash + end + + + ### Generates a Fixnum hash for the receiver. + def hash + return [ self.class, self.dn ].hash end ### Comparable interface: Returns -1 if other_branch is less than, 0 if +other_branch+ is ### equal to, and +1 if +other_branch+ is greater than the receiving Branch.