diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-30 21:02:00 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-30 21:02:00 +0000 |
commit | b05721765ef08c56443221808f611b571f0de767 (patch) | |
tree | 55c5665ffc496b151e21f179f2cc2b2d22016de4 /test/ruby | |
parent | 4f5d3c5e53037e979293e733d2d0edd4ff64c9f1 (diff) | |
download | ruby-b05721765ef08c56443221808f611b571f0de767.tar.gz |
* test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
free slots to fix test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_gc.rb | 3 |
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 |