From: Rick DeNatale Date: 2007-03-20T03:16:25+09:00 Subject: Re: Sorting Dates and Times in an array On 3/19/07, Rob Biedenharn wrote: > The use of .sort_by causes the keys to be processed once and is > better for large Arrays than .sort (and if you need .sort!, just do > @date_array = @date_array.sort_by {...} instead). Not exactly the same if you have more than one reference to the Array. A more general equivalent to sort! would be: @date_array.replace(@date_array.sort_by {...}) Another one of those sometimes subtle differences between variables and objects. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/