From: Martin DeMello Date: 2003-01-13T17:50:37+09:00 Subject: Re: sorting with the Swartzian transform Bulat Ziganshin wrote: > Hello Martin, > > Sunday, January 12, 2003, 11:48:27 AM, you wrote: > > MD> class Array > MD> def ssort(&block) > MD> map {{|i| [&block.call(i), i]}\ > MD> .sort {|a,b| a[0] <=> b[0]}\ > > just ".sort" will be faster (in most cases :) Good point! Yet another place where Ruby just does the right thing. martin