From: "Brian Schröder" Date: 2005-08-25T04:33:14+09:00 Subject: Re: Very strange GC behaviour On 24/08/05, Kroeger Simon (ext) wrote: > > [...] > > One gotcha I've only seen after sending the other mail is, that moving > > the variables to the outer loop won't buy you anything. While the GC > > is disabled, this should eat infinite amounts of memory > > > > GC.disable > > a = "empty-" > > loop do a += "" end > > GC.enable > > True, but > > -------------------- > GC.disable > a = "empty-" > loop do a << '' end > GC.enable > -------------------- > > should not :) > and > > -------------------- > GC.disable > a = "empty-" > b = '' > loop do a << b end > GC.enable > -------------------- > > does not. > > One has to be very carefull when disabling GC. > (Don't know if anything of this helps...) > > cheers > > Simon > > That was exactly what I wanted to show ;-/ regards, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/