From: Caleb Clausen Date: 2010-03-06T08:44:47+09:00 Subject: [ruby-core:28521] Re: [Feature #905] Add String.new(fixnum) to preallocate large buffer On 3/5/10, Nikolai Weibull wrote: > I�m getting the feeling thath the only real use case that we�ve got > for this so far is ERb. Wouldn�t it make more sense to change the way > ERb (and similar �string concatenators�) creates its result? So, maybe erb can be modified to collect its result in an array which is #join'd just before returning instead of a string which is catenated to as you go along. In other words, instead of something like this: def expand_template result='' fragments.each{|frag| .... #evaluate frag if appropriate result<