summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 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