From: Kenneth McDonald Date: 2007-06-05T07:07:05+09:00 Subject: Re: Reverse-range alternatives? fREW wrote: > On 6/4/07, Kenneth McDonald wrote: >> Since a reverse range (eg. 4...1) is functionally almost the same as an >> empty range, is there an alternative in the standard library, where >> .each would actually iterate over the elements from first to last, in >> this case 4, 3, 2? >> >> Thanks, >> Ken >> >> > > You could do 4.downto(2) { |i| ... } Oh, of course. I'm still not entirely used to thinking of numbers as having a bunch of their own methods. Thanks! Ken