lib/blather/roster_item.rb in blather-0.4.15 vs lib/blather/roster_item.rb in blather-0.4.16

- old
+ new

@@ -120,11 +120,14 @@ def <=>(o) self.jid.to_s <=> o.jid.to_s end - def eql?(o) - o.is_a?(RosterItem) && + # Compare two RosterItem objects by name, type and category + # @param [RosterItem] o the Identity object to compare against + # @return [true, false] + def eql?(o, *fields) + o.is_a?(self.class) && o.jid == self.jid && o.groups == self.groups end alias_method :==, :eql? end #RosterItem