zetetic wrote:
> 1.downto(1) {|i| puts i}
> => 1
> 
> 1.downto(2) {|i| puts i}
> => 1
> 
> Is this right?  The block is always executed once, even when the limits
> would suggest otherwise? 1.upto(0) does the same thing...


Hello zetetic,
as far as I can see the block is actually never _executed_ when you say

1.downto(2) {|i| puts i}

the expression just _evaluates_to_ 1 because you obviously called a 
method on 1. Look at the output, it says

irb(main):007:0> 1.downto(2) {|i| puts i}
=> 1

and doesn't execute the block. Now consider

irb(main):009:0> 1.upto(5) {|i| puts i}
1
2
3
4
5
=> 1

how it _executes_ the block and also _returns_ 1 at the end.

Regards,
Matthias