From: Kaspar Schiess Date: 2005-01-10T21:09:03+09:00 Subject: Re: Immediate values Hello, I have already answered to this on the irc channel, but will try to collect the answers given as an answer for the history: Ruby variables hold references to objects. Objects are allocated on the heap, so a variable saves a pointer to the heap. n1 = "test" n2 = n1 # n1 and n2 point to the _same_ object. n1.object_id == n2.object_id # > true So you do have to take care not to modify n1, otherwise you will be modifying n2 too. This is actually less often a problem than one would think. # look here n1 += 'test' # creates new object and leaves n2 alone # of course n1.sub! /est/, 'ry' # will modify n1 and n2 Look also here: http://www.rubycentral.com/book/tut_classes.html, starting at the title 'Variables'. Of course that is what you need to think about objects, rather than what it looks like behind the facade. If you are interested in the underlying reality I guess you need to look at some code. best regards, kaspar