From: Matt Armstrong Date: 2003-02-19T15:02:10+09:00 Subject: Re: String#+ operatorbroken? Jim Freeze writes: > I have some code sitting around that used the notation > (Yes, it was written long ago before I knew better) > > s = "" > s += "whatever" > > I tried to use it today with 1.8.0, but my program went wild on > memory usage. (Now, remember, this code worked fine under 1.6.7 and > possibly 1.7.3.) What version do you mean by 1.8.0? I.e. what is printed with: ruby -e "p RUBY_RELEASE_DATE" The current CVS version of ruby does not "blow up real fast" with the "+=" case of your test program below. Perhaps you are encountering a bug that has been since fixed? > s = "" > 100000.times { |i| > s << "fred\n" # this completes in less than 1 second > #s += "fred\n" # this blows up real fast > } -- matt