"Mauricio FernŠŌdez" <batsman.geo / yahoo.com> schrieb im Newsbeitrag
news:20030512111004.GA30107 / student.ei.uni-stuttgart.de...
> On Mon, May 12, 2003 at 07:40:24PM +0900, meinrad.recheis wrote:
> > thank you robert and batsman! that was really helpful.
> >
> > how come you both know so much about implementation of ruby?

I wouldn't say that I know the implementation of ruby.  I prefer reading
the docs, using irg and / or small test scripts like the one I posted to
gain knowledge.

Apart from that, "+=" is "+" (which creates a new instance) followed by
"=" (which assigns the new instance, possibly handing over the old
instance to garbage collection).  "<<" on the other hand is an instance
method that does only append to the current string.  You save the
allocation of the new instance and GC of the unused.

Regards

    robert