Issue #889 has been updated by caleb clausen.


I'm afraid that I have to agree with Kurt, in that the changed behavior of this proposal would cause too many problems for existing users. Thanks for spotting that, Kurt.

Instead maybe #dup the string before adding it to erb's buffer? This might actually perform somewhat reasonably since ruby seems to create a copy-on-write string when you #dup. But it's likely to erase any small gain that had been achieved by avoiding extra reallocs.

Another possibility might be to have erb write directly to the output file (or in this case, socket). I was excited about this possibility, but on reflection it seems fraught with problems.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/889

----------------------------------------
http://redmine.ruby-lang.org