From: Siep Korteling Date: 2007-12-30T07:34:28+09:00 Subject: Re: Using "sort!" in a C extension (1.9 problem) Andre Nathan wrote: > My example was a bit contrieved because I could just have used #sort > without a block. What I'm actually doing is sorting an array by the > length of its elements, which are also arrays. That's why I need the > block version of #sort. Like this? a=[[2],[1,2,3],[1],[1,2]] p a.sort_by{|ar|ar.length} -- Posted via http://www.ruby-forum.com/.