From: Trans Date: 2007-06-05T14:30:03+09:00 Subject: Re: Reverse-range alternatives? On Jun 4, 4:51 pm, 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? Would be nice if Range supported this. It would mean working off a #pred, not just #succ. It's been a while since I've messed with it, but I'm pretty sure Facets' Interval class does this. For a lite solution however you might consider: (-4..-1).each { |i| i.abs } T.