diff options
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 90c47875ee..b1e52fc58e 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -64,6 +64,12 @@ class TestGc < Test::Unit::TestCase assert_equal(arg, res) assert_equal(false, res.empty?) assert_kind_of(Integer, res[:count]) + + stat, count = {}, {} + GC.start + GC.stat(stat) + ObjectSpace.count_objects(count) + assert_equal(count[:TOTAL]-count[:FREE], stat[:heap_live_num]) end def test_singleton_method |