From: gabriele renzi Date: 2004-10-08T23:19:44+09:00 Subject: Re: A sort_by descending sort Michael Gaunnac ha scritto: > Perhaps this has already been covered, but I discovered this idiom for doing a descending sort using sort_by. why not: >> [1,2.0,6,23 ,546,421.1,,0.1].sort_by {|x| 1-x} => [546, 421.1, 23, 6, 2.0, 1, 0.1] Anyway, thankx for making me think of this :)