From: Jano Svitok Date: 2008-03-03T23:43:42+09:00 Subject: Re: Normal For Loop On Mon, Mar 3, 2008 at 3:29 PM, jwmerrill@gmail.com wrote: > i=i+1 is the way to do it. There is some rationale for this, but I > don't remember what it is. IIRC, the rationale is that variables in ruby are just references to objects, so you cannot call methods on variables themselves. You call methods on objects they reference. That means a call (except assignment) cannot change the object a variable points to. i.e. i = 3 that means, variable i points to/references object 3 of class Fixnum. if there was a call ++, (i++) that would mean the same as 3++. 3++ call can be written so that it returns 4 (actually it's called 3.succ), but there's no way to assign 4 back to i. It would still point to 3. And because Fixnums are singletons (there's only one "3" object) they are read only, so there's no 3.succ!