From: Eric Armstrong Date: 2002-11-12T07:24:04+09:00 Subject: Re: Lighting Rod dblack@candle.superlink.net wrote: > $ ruby -e '3.times {|x| p x}' > 0 > 1 > 2 > > > I saw one page that said it cycled through > > indices 0,1,2,3. Hopefully, that was an error! > > Can you find that page? I wonder if there was confusion because > in irb you see a '3' at the end of the list (which is actually the > return value of the call to #times). Ah. I'll bet that was it. I'll see if I can find the page. I'll bet it was the return value. The loop was echoing the index, producing the result 0,1,2,3 !