From: Phlip Date: 2008-08-24T23:50:52+09:00 Subject: Re: defining sort <=> for a class Adam Akhtar wrote: > ahh so the <=> thing is called implicitly, i dont have to call it > automatically in my code. I just do sort!. Alternately, use sort_by to repurpose the implicit <=>. Examples: .sort_by{rand} # a shuffle .sort_by{|x| -x } # reverse order .sort_by{|r| r.name.downcase } # ascibetic order by name -- Phlip