From: Dossy Date: 2002-08-25T10:32:12+09:00 Subject: Re: CompareByValue Curiousity struck me some and I discovered what I posted wasn't the minimal set to make all tests pass. I could comment out two more lines without making the tests break: module CompareByValue def ==(other) # return true if self.id == other.id return false unless self.type == other.type return false unless self.instance_variables == other.instance_variables self.instance_variables.each { |name| next if self.id == self.instance_eval(name).id next if self.id == other.instance_eval(name).id # next if other.id == other.instance_eval(name).id # next if other.id == self.instance_eval(name).id return false unless self.instance_eval(name) == other.instance_eval(name) } true end end -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)