summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc_compact.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index bc26897386..e93e775279 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -54,4 +54,10 @@ class TestGCCompact < Test::Unit::TestCase
assert GC.compact
walk_ast ast
end
+
+ def test_compact_count
+ count = GC.stat(:compact_count)
+ GC.compact
+ assert_equal count + 1, GC.stat(:compact_count)
+ end
end