diff --git a/ChangeLog b/ChangeLog index 8f40a713a6..7477d26ce9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 3 18:43:51 2014 Koichi Sasada + + * test/ruby/test_gc.rb: allocate more objects to invoke GC by newobj. + GC allows extending pages depends on heap_increment. + Tue Jun 3 18:01:27 2014 Koichi Sasada * gc.c (rb_gc_call_finalizer_at_exit): add diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 3d0bca6eff..00a49418ac 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -107,7 +107,8 @@ class TestGc < Test::Unit::TestCase def test_latest_gc_info GC.start - GC.stat(:heap_free_slot).times{ "a" + "b" } + count = GC.stat(:heap_free_slot) + GC.stat(:heap_increment) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT] + count.times{ "a" + "b" } assert_equal :newobj, GC.latest_gc_info[:gc_by] GC.start