On 4/29/05, Kristof Bastiaensen <kristof / vleeuwen.org> wrote:
> On Fri, 29 Apr 2005 22:32:38 +0900, Dick Davies wrote:
> 
> > * Joe Van Dyk <joevandyk / gmail.com> [0450 23:50]:
> >> On 4/28/05, James Edward Gray II <james / grayproductions.net> wrote:
> >> > ------------------------------------------------------------- Range#step
> >> >       rng.step(n=1) {| obj | block }    => rng
> >> > ------------------------------------------------------------------------
> >
> >> But that only goes up, right?
> >
> > Apparently so -
> >
> > irb(main):004:0> (100..10).step(-2) { |x| puts x }
> > ArgumentError: step can't be negative
> >         from (irb):4:in `step'
> >         from (irb):4
> 
> Worthy of a RCR?

I dunno.  In my case, I have to check to see if what I want to iterate
to is greater than or less than zero.  Then I change the 'step'
increment/decrement value to be either positive or negative,
respectively.  It's not that difficult but it's sorta clunky.