I was able to recreate it with notest=3 using ruby C:\dev>\installs\ruby-1.9.1p0-mswin32_90\bin\ruby -v ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32_90] [1] but not with this version: C:\dev>\installs\ruby_19\bin\ruby -v ruby 1.9.0 (2008-11-22 revision 20317) [i386-mingw32] and not on linux. Cheers! -=r [1] http://rubyforge.org/pipermail/rubyinstaller-devel/2009-February/000473.html On Mon, Feb 16, 2009 at 5:17 AM, regis d'aubarede <redmine / ruby-lang.org> wrote: > Bug #1164: 1.9/windows memroy leak with rand() AND inspect > http://redmine.ruby-lang.org/issues/show/1164 > > Author: regis d'aubarede > Status: Open, Priority: Normal > Category: core, Target version: 1.9.1 > ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] > > # Here is my codes. memory jump far away with ruby 1.9.1, stable with 1.8.6 > # seems that a issue arrive when inspect() AND rand() are call in the same function (?!) > > $MAXC=500 > def test1 ss=[] ; 0.upto($MAXC) {|j| ss << j }; ss.inspect ; end > def test2 ss=[] ; 0.upto($MAXC) {|j| ss << j*rand() }; end > def test3 ss=[] ; 0.upto($MAXC) {|j| ss << rand() }; ss.inspect ; end # bug > def test4 ss=[] ; 0.upto($MAXC) {|j| ss << rand() }; end > def test5 ss=[] ; 0.upto(1000*$MAXC) {|j| rand() } end > def test6 ss=[] ; 0.upto(1000*$MAXC) {|j| rand().inspect } end # bug > def test7 ss=[] ; 0.upto(1000*$MAXC) {|j| j.inspect } end > > puts RUBY_VERSION > notest=7 > notest==1 && 0.upto(1000*1000*1000) { test1 } # ok > notest==2 && 0.upto(1000*1000*1000) { test2 } # ok > notest==3 && 0.upto(1000*1000*1000) { test3 } # >>>> bug 1.9.1 > notest==4 && 0.upto(1000*1000*1000) { test4 } # ok > notest==5 && 0.upto(1000*1000*1000) { test5 } # ok > notest==6 && 0.upto(1000*1000*1000) { test6 } # >>>> bug 1.9.1 > notest==7 && 0.upto(1000*1000*1000) { test7 } # ok > > > ---------------------------------------- > http://redmine.ruby-lang.org > >