diff --git a/ChangeLog b/ChangeLog index 343684cd39..ed5261eefb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Dec 1 06:00:49 2013 Aman Gupta + + * 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 * dir.c (dir_initialize): check unknown keywords. [ruby-dev:47152] diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 2668582ed8..034a330c85 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -80,7 +80,8 @@ class TestGc < Test::Unit::TestCase 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