Hi --

On Tue, 13 Dec 2005, Frederick Ros wrote:

> Wouldn't this be simpler ? :
>
> h.sort_by {|k,v| [v[:a],v[:b],v[:c],v[:d]]}.reverse

Or:

   h.sort_by {|k,v| v.values_at(:a,:b,:c,:d) }.reverse

(Possibly a little clearer visually.)


David

-- 
David A. Black
dblack / wobblini.net

"Ruby for Rails", forthcoming from Manning Publications, April 2006!