From: Rick DeNatale Date: 2010-07-18T22:50:28+09:00 Subject: Re: Infinite Loop in Code -- Logic Error On Sun, Jul 18, 2010 at 5:03 AM, James Rasmussen wrote: > However, dup copies instance variables over, and it IS a shallow copy, > but if you change an instance variable, based on my debugging, it > changes the original as well. James, at this point in your journeys in Ruby, it might be well to understand the difference between variables and objects. The dup method doesn't act on variables, like all other methods in Ruby it acts on an object. Variables are simply references to objects. http://talklikeaduck.denhaven2.com/2006/09/13/on-variables-values-and-objects -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale