aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 7410516c7a..d43f8b8693 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -79,6 +79,12 @@ class TestGc < Test::Unit::TestCase
assert_equal(count[:FREE], stat[:heap_free_slot])
end
+ def test_stat_single
+ stat = GC.stat
+ assert_equal stat[:count], GC.stat(:count)
+ assert_raise(ArgumentError){ GC.stat(:invalid) }
+ end
+
def test_gc_reason
GC.start
GC.stat[:heap_free_slot].times{ "a" + "b" }