From: Douglas Livingstone Date: 2005-03-08T20:51:55+09:00 Subject: Re: Noob:Objects as key in hash Good job :) I think you can get rid of the returns too: #---ruby proggie class PointID attr_reader :x,:y def initialize(x,y) @x, @y = x, y freeze end def hash [@x.object_id, @y.object_id].hash end def ==(other) self.hash == other.hash end def eql?(other) self == other end def to_s "#{@x},#{@y}" end end #---end proggie Douglas On Mon, 7 Mar 2005 07:00:32 +0900, Tom Willis wrote: > > Thanks again for all the feedback. Hopefully someday I can return the favor. > -- > Thomas G. Willis > http://paperbackmusic.net > >