From: Ivan Salazar Date: 2007-06-24T01:55:55+09:00 Subject: Re: Globals not incrementing inside block ------=_Part_149258_24133223.1182617757055 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Ohhh, right. I know where is the mistake... My poor english. Im still not writing what I want to say XD. My bad, I am very sorry. But that's what I ment to say. 2007/6/14, Rick DeNatale : > > On 6/14/07, Ivan Salazar wrote: > > On Jun 7, 2:15 pm, "Rick DeNatale" wrote: > > > > May I have the temerity to point out that there's another subtle > > > misconception in this statement which I see a lot of Ruby nubies trip > > > up on, and that's thinking that variables are objects. > > > > > > An object holds state and behavior, a variable references an object. > > I agree with you, that is also a frequent misconception. > > > > >In brief, to modify an object you make a call to a method with > > >side effects or reassign the object to the new one created after the > method > > >call. > > > > The one above should read: "or reassign the variable to the new object > > created". > > (I don't know what happened, maybe I got confused while writing or it > > was just > > my good-old stupidity XD) > > Just nit-picking but even with that change, it's still not quite > right, reassigning a variable doesn't modify the object it previously > referenced. > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ > > ------=_Part_149258_24133223.1182617757055--