From: "Pedro Côrte-Real" Date: 2006-08-01T01:00:03+09:00 Subject: Re: Weird elusive bug using Comparable On 7/31/06, Pedro C�rte-Real wrote: > On 7/31/06, Robin Stocker wrote: > > How about something like this (untested): > > > > def <=>(other) > > VALS.map{ |key| self.send(key) } <=> VALS.map{ |key| other.send(key) } > > end I tried it like this: def <=>(other) p 'At the start' result = VALS.map{|key| self.send(key)} <=> VALS.map{|key| other.send(key)} p 'At the end' result end And the strange thing is that 'At the end' isn't printed but 'At the start' is. How can this be? Pedro.