From: James Edward Gray II Date: 2005-10-19T23:06:04+09:00 Subject: Re: Array.sort when it's items are String inheritors with redefined <=> works like if not redefined On Oct 19, 2005, at 8:59 AM, Yukihiro Matsumoto wrote: > Why not use sort_by, much simpler solution? > > a = ['1', '10', '5'] > puts a.sort_by{|x|x.to_u}.join(',') I believe that second line is supposed to read: puts a.sort_by{|x|x.to_i}.join(',') James Edward Gray II