David A. Black wrote:
> Hi --
> 
> On Sun, 7 Oct 2007, Eric Hodel wrote:
> 
>> You can't easily use the more-efficient #sort_by because you'll need to know 
>>
>> something better.
> Maybe #sort_key.
> 
> 
> David

I'd support that. I wrote a nat_cmp for String and added 
String#nat_cmp_key to use sort_by.
It would be nice if the object returned allowed #-@ to be called, to 
enable reverse sorting by easily doing: enum.sort_by { |o| -o.sort_key }

Regards
Stefan
-- 
Posted via http://www.ruby-forum.com/.