From: corey konrad <0011@...> Date: 2006-05-16T07:05:05+09:00 Subject: learn to program I realy dont understand what Chris is talking about here in his book "learning to program" Can someoe shed some light on this def little_pest tough_var tough_var = nil puts ' HAHA! I ruined your variable!' end tough_var = ' You can\' t even touch my variable!' little_pest tough_var puts tough_var output: HAHA! I ruined your variable! You can' t even touch my variable! excerpt from his book: In fact, two variables in that little program are named tough_var: one inside little_pest and one outside of it. They don’t communicate. They aren’t related. They aren’t even friends. When we called little_pest tough_var, we really just passed the string from one tough_var to the other (via the method call, the only way they can even sort of communicate) so that both were pointing to the same string. Then little_pest pointed its own local tough_var to nil, but that did nothing to the tough_var variable outside the method. -- Posted via http://www.ruby-forum.com/.