From: Bulat Ziganshin Date: 2002-10-23T21:34:35+09:00 Subject: Re: Things That Newcomers to Ruby Should Know (10/16/02) Hello Mauricio, Wednesday, October 23, 2002, 4:09:02 PM, you wrote: >> def a(s) >> s << '!' >> s += '?' >> return s >> end MF> Would it be possible for Ruby to know whether an object is referenced by MF> several variables so += does '<<' or '... = ... + ...' when appropriate? MF> Perhaps a bit in each String indicating whether it is shared or MF> not would make it... and GC issues could be ignored at first. simple things must remain simple :) instead of counting references and checking reference count at each '+=' ruby just creates new objects ang g.c. old and unreferenced -- Best regards, Bulat mailto:bulatz@integ.ru