From: Bulat Ziganshin Date: 2002-11-28T16:10:33+09:00 Subject: Re: call-by-reference problem again Hello Shannon, Thursday, November 28, 2002, 12:54:37 AM, you wrote: SF> a=b=c=Array.new SF> d=e=f="" SF> In my program, if I modify a, b and c will be affected, in another word, SF> a, b, c point to the same Array. while I modify d, e and f are not SF> affected, which means, strings are assigned by value... what will happen SF> if I write d=e=f=String.new? it's because you use self-modifying methods in one case and create new objects in another. try this code :) a=b=c=Array.new d=e=f="" a += [1] d << "a" -- Best regards, Bulat mailto:bulatz@integ.ru