From: Dave Lenhardt Date: 2008-09-21T06:50:51+09:00 Subject: Re: Explaination of a bit of code And while we are at little samples of code... if false a = 1 end 3.times {|i| a = i } a --> 2 I was looking at an example and was a bit confused why variable a got 2. I undrestand the basic idea of this example (as long as a is defined somewhere, evne if it's value is never reached, it exists), but why 2? Is the times method going from 0 to X-1 where X is the number in X.times? -- Posted via http://www.ruby-forum.com/.