jogloran
7/8/2006 12:06:00 PM
100.downto(0) { |i|
p i
}
On 7/8/06, Une bévue <pere.noel@laponie.com.invalid> wrote:
> the incrementing for loop :
>
> for i in 0..100
> p i
> end
>
> gets 0 ...> 100
>
> is their a syntax for a decrementing one like :
>
> for i in 100..0 (specifing the step to -1)
> p i
> end
>
> --
> une bévue
>
>