summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r--test/ruby/test_gc.rb3
1 files changed, 2 insertions, 1 deletions
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