From: Shannon Fang Date: 2002-12-03T08:18:39+09:00 Subject: Re: call-by-reference problem again Hi, I modified my code, I'm afraid that I can't find it. It is like the following: class MailInfo def initialize @path=@recipients=@from=Array.new ... end def parse case header when "TO", "CC", "BCC" @recipients << header when "RECEIVED" @path << header end end ... end in the above code, the arrays will interfere with each other. The way to solve it is not to use chained assignment. Thanks Shannon On Tue, 3 Dec 2002 07:10:30 +0900 William Djaja Tjokroaminata wrote: > Shannon Fang wrote: > > Hi Bill, > > In my test the Arrays are all pointing to the same object, but the > > strings are not. I now understand that david has explained what happed > > in my prog. > > Hi Shannon, > > Can you give me the code where arrays are behaving differently from > strings? > > Bill