From: Dave Burt Date: 2004-05-23T07:48:45+09:00 Subject: Re: sort_by to accept symbol? I like it. "alex fenton" wrote in message news:1085254048.531196@news01.eclipse.net.uk... > hi > > I was wondering whether it'd be useful for Array#sort_by to accept a > symbol as an alternative to a block for the sort rule. > > So > > my_array.sort_by(:foo) > > would mean > > my_array.sort_by { | elem | elem.send(:foo) } > > It's not so much to save typing as to make it neater to use sort_by in > chained method calls. > > Any takers? > > alex