From: Gregory Brown Date: 2006-11-04T09:15:27+09:00 Subject: Re: str1 = str2 is not a copy?!? On 11/2/06, Louis J Scoras wrote: > As has been pointed out, you are creating a new binding to the same > object. Where it can get tricky is with multiple value assignments: > > array = ['you', 'loose.'] > a, b = array > > p [a,b] > p array > > b = 'win!' > p array # Doh!! > > x = array ; x[1] = 'win!' > p array # array has been changed I get the point of this example, but it's worth noting that you can change the array via b if you just use String#replace >> b.replace "win" >> array => ["you", "win"]