From: Kent Sibilev Date: 2005-04-30T01:25:26+09:00 Subject: Re: stupid question But you still can do: irb(main):001:0> 100.step(0, -10){|i| puts i} 100 90 80 70 60 50 40 30 20 10 0 => 100 irb(main):002:0> On 4/29/05, Kristof Bastiaensen wrote: > On Fri, 29 Apr 2005 22:32:38 +0900, Dick Davies wrote: > > > * Joe Van Dyk [0450 23:50]: > >> On 4/28/05, James Edward Gray II 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? > >