From: Mike Campbell Date: 2002-11-10T09:40:11+09:00 Subject: Re: Lighting Rod This is a multi-part message in MIME format. ------=_NextPart_000_0002_01C28827.CDE600A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit He didn't say it was =) -----Original Message----- From: Michael Babbitt [mailto:mbabbitt@hotmail.com] Sent: Saturday, November 09, 2002 1:34 PM To: ruby-talk ML Subject: Re: Lighting Rod Try 103.times; see what you get. The last number is not a sum. ----- Original Message ----- From: Bob X Sent: Saturday, November 09, 2002 9:43 AM To: ruby-talk@ruby-lang.org Subject: Re: Lighting Rod "Kirk Haines" wrote in message news:48674.148.78.249.10.1036859159.squirrel@enigo.com... > Eric Armstrong said: > And this is certainly inconsistent with what is stated in the Pickaxe book: > > "Iterates block int times, passing in values from zero to int - 1" > Isn't that exactly what it is doing? irb(main):001:0> 3.times {|d| puts d} 0 <--- value starting at zero 1 2 <--- to int(3)-1 which would 2 3 <--- this is the return value (0,1,2 = 3) Maybe I am mistaking what you are saying. Bob ---------------------------------------------------------------------------- -- Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ------=_NextPart_000_0002_01C28827.CDE600A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
He = didn't say it=20 was =3D)
-----Original Message-----
From: Michael = Babbitt=20 [mailto:mbabbitt@hotmail.com]
Sent: Saturday, November 09, = 2002 1:34=20 PM
To: ruby-talk ML
Subject: Re: Lighting=20 Rod

Try 103.times; see what you get. The last number is not a = sum.
 
 
----- Original Message -----
From: Bob=20 X
Sent: Saturday, November 09, = 2002 9:43=20 AM
To: = ruby-talk@ruby-lang.org
Subject: Re: Lighting = Rod
 
"Kirk Haines" <khaines@enigo.com> wrote in=20 = message
news:48674.148.78.249.10.1036859159.squirrel@enigo.com...
&= gt;=20 Eric Armstrong said:
> And this is certainly inconsistent with = what is=20 stated in the Pickaxe
book:
>
> "Iterates block int = times,=20 passing in values from zero to int - 1"
>
Isn't that = exactly what=20 it is doing?

irb(main):001:0> 3.times {|d| puts=20 d}
0   <--- value starting at = zero
1
2  =20 <--- to int(3)-1 which would 2
3   <--- this is = the=20 return value (0,1,2  =3D  3)

Maybe I am mistaking = what you=20 are saying.

Bob


Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com

------=_NextPart_000_0002_01C28827.CDE600A0--