From: James Edward Gray II Date: 2005-12-12T06:33:08+09:00 Subject: Re: creating a <=> method On Dec 11, 2005, at 3:29 PM, Dirk Meijer wrote: > hi everyone, > i've created a class, and want it to be comparable with itself, but > i don't > know what to place inside the <=> method. > the basic idea is that one of the values of the class (which is a > symbol) is > converted to a string, which is then compared. Like this? def <=>( other ) sym.to_s <=> other.sym.to_s end James Edward Gray II