aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_gc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r--test/ruby/test_gc.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 0ed592b285..ff0696bce5 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -385,4 +385,15 @@ class TestGc < Test::Unit::TestCase
C.new
end;
end
+
+ def test_gc_disabled_start
+ begin
+ disabled = GC.disable
+ c = GC.count
+ GC.start
+ assert_equal 1, GC.count - c
+ ensure
+ GC.enable unless disabled
+ end
+ end
end