From: Patrick Li Date: 2008-08-15T11:09:19+09:00 Subject: Re: Use of dup to remove references Ruby treats all variables as references to an object. ie. if i say: sentence = "my string" you can think of it like this: "my string" is stored as data somewhere in memory( let's say memory slot 13) then will hold the value 13. (the memory location that contains it's data) so if you say: sentence_new = sentence then it will assign the value 13 to so now both and refers to whatever is at memory slot 13. so now it doesn't matter if you say: sentence_new[open..close] = '' OR sentence[open..close] = '' they're both modifying the data at memory slot 13. Hope that helps clear things up. -Patrick -- Posted via http://www.ruby-forum.com/.