mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
df05bd2c82
commit
b79bf14ff2
3 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Aug 2 11:39:25 2012 Narihiro Nakamura <authornari@gmail.com>
|
||||||
|
|
||||||
|
* gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
|
||||||
|
|
||||||
|
* test/ruby/test_gc.rb: add test-case for this bug.
|
||||||
|
|
||||||
Thu Aug 2 10:51:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
|
Thu Aug 2 10:51:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
|
||||||
|
|
||||||
* ext/openssl/lib/openssl/digest.rb
|
* ext/openssl/lib/openssl/digest.rb
|
||||||
|
|
2
gc.c
2
gc.c
|
@ -672,7 +672,7 @@ static VALUE
|
||||||
gc_profile_enable_get(VALUE self)
|
gc_profile_enable_get(VALUE self)
|
||||||
{
|
{
|
||||||
rb_objspace_t *objspace = &rb_objspace;
|
rb_objspace_t *objspace = &rb_objspace;
|
||||||
return objspace->profile.run;
|
return objspace->profile.run ? Qtrue : Qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -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, "-W1", "-e", "exit"], "", [], [], "[ruby-core:39795]")
|
||||||
assert_in_out_err([env, "-w", "-e", "exit"], "", [], /heap_min_slots=100000/, "[ruby-core:39795]")
|
assert_in_out_err([env, "-w", "-e", "exit"], "", [], /heap_min_slots=100000/, "[ruby-core:39795]")
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue