ruby-changes:31858
From: tmm1 <ko1@a...>
Date: Sun, 1 Dec 2013 06:02:06 +0900 (JST)
Subject: [ruby-changes:31858] tmm1:r43937 (trunk): * test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
tmm1 2013-12-01 06:02:00 +0900 (Sun, 01 Dec 2013) New Revision: 43937 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43937 Log: * test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming free slots to fix test. Modified files: trunk/ChangeLog trunk/test/ruby/test_gc.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 43936) +++ ChangeLog (revision 43937) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Dec 1 06:00:49 2013 Aman Gupta <ruby@t...> + + * test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming + free slots to fix test. + Sat Nov 30 21:22:11 2013 Nobuyoshi Nakada <nobu@r...> * dir.c (dir_initialize): check unknown keywords. [ruby-dev:47152] Index: test/ruby/test_gc.rb =================================================================== --- test/ruby/test_gc.rb (revision 43936) +++ test/ruby/test_gc.rb (revision 43937) @@ -80,7 +80,8 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L80 end def test_gc_reason - 100_000.times{ "a" + "b" } + GC.start + GC.stat[:heap_free_slot].times{ "a" + "b" } assert_equal({:gc_by => :newobj}, GC::Profiler.decode_flags(GC.stat[:last_collection_flags])) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/