Kirk Haines wrote:

> This one is certainly easy to test for oneself:
> 
> [root@enigo1 tutorial]# irb
> irb(main):001:0> 3.times {|d| puts d}
> 0
> 1
> 2
> 3

The last line isn't from puts, it is from irb itself. The result of the
times() call is the value it was called on, which irb echoes.

An illustrative example:

irb(main):003:0> 3.times {|d| puts d * 10}
0
10
20
3


/Anders

-- 

A n d e r s  B e n g t s s o n  |  ndrsbngtssn / yahoo.se
Stockholm, Sweden               |

_____________________________________________________
Gratis e-mail resten av livet pwww.yahoo.se/mail
Busenkelt!