On Sun, Mar 8, 2009 at 12:40 PM, James Lee <redmine / ruby-lang.org> wrote:
> I hadn't considered other references to the string. =A0Still, you already=
 have to maintain a reference count, so if the number of references before =
the call to +=3D is 1, it should be okay to do a destructive update, right?

There's also the issue of monkey patching on String. a +=3D b is, as far
as I'm aware, just a syntactic shortcut for a =3D a + b. If someone has
monkey patched String#+ to do something special, but a +=3D b (where a
is a String) ignores the new String#+ -- and they can't explicitly
override +=3D -- that could be a problem. Sure, you can argue (and most
likely convince me) that String#+ shouldn't be monkey patched in the
first place, but breaking it altogether is a rather wet blanket to
throw on experimenters that might be trying to implement a more
efficient String#+, etc.

Jacob Fugal