From 59995abc1ea07a2278a9f87b66587c65486e01da Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 19 Dec 2012 12:14:45 +0000 Subject: merge revision(s) 36593: [Backport #7407] * 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/branches/ruby_1_9_3@38469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_gc.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index bcc490626d..63bec82aad 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -97,4 +97,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 -- cgit v1.2.3