From: Martin DeMello Date: 2009-06-08T18:32:57+09:00 Subject: Re: How to sort array ascending, except zero ? On Mon, Jun 8, 2009 at 2:57 PM, Robert Klemme wrote: > Still traversing the array twice just to get the max beforehand does > not /feel/ right.  I'd rather use your "large constant" - maybe even > with a _really_ large number: :-) > > irb(main):020:0> a = [1,4,2,0,8,9] > => [1, 4, 2, 0, 8, 9] > irb(main):021:0> INF = 1.0 / 0.0 > => Infinity Ah yes, forgot you could compare floats with fixnums :) martin