diff options
author | nari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-02 02:47:12 +0000 |
---|---|---|
committer | nari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-02 02:47:12 +0000 |
commit | b79bf14ff26e11765c1605c7da9a3e72902c92d8 (patch) | |
tree | b6687f013db032d1355984977146fd6911922abb /test | |
parent | df05bd2c82386e5897c4125576199e18a13712a1 (diff) | |
download | ruby-b79bf14ff26e11765c1605c7da9a3e72902c92d8.tar.gz |
* gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
* test/ruby/test_gc.rb: add test-case for this bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_gc.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index f32a381239..39716eb7e2 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -109,4 +109,13 @@ class TestGc < Test::Unit::TestCase assert_in_out_err([env, "-W1", "-e", "exit"], "", [], [], "[ruby-core:39795]") assert_in_out_err([env, "-w", "-e", "exit"], "", [], /heap_min_slots=100000/, "[ruby-core:39795]") end + + def test_profiler_enabled + GC::Profiler.enable + assert_equal(true, GC::Profiler.enabled?) + GC::Profiler.disable + assert_equal(false, GC::Profiler.enabled?) + ensure + GC::Profiler.disable + end end |