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

- old
+ new

@@ -438,9 +438,17 @@ return self end + ### 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 + 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. def <=>( other_branch ) # Try the easy cases first return nil unless other_branch.respond_to?( :dn ) &&