aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-19 12:57:20 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-19 12:57:20 +0000
commit200ff668f494b88f1ac2c567cc5989da3f91d738 (patch)
tree2c7dcf6e8b6edaba9b31debc032bf299ba223cb8 /test
parent03df5d94ca679e8fbd30dc6f1b2a6df8295a2537 (diff)
downloadruby-200ff668f494b88f1ac2c567cc5989da3f91d738.tar.gz
* gc.c (gc_start): force to invoke GC by GC.start
even if it is GC.disable'd. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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