* gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-06-18 22:49:19 +00:00
parent bfac961bed
commit 97dd259df5
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Wed Jun 19 07:47:48 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.
Wed Jun 19 07:44:31 2013 Koichi Sasada <ko1@atdot.net> Wed Jun 19 07:44:31 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object. * gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.

2
gc.c
View File

@ -3871,7 +3871,7 @@ garbage_collect_body(rb_objspace_t *objspace, int full_mark, int immediate_sweep
immediate_sweep = TRUE; immediate_sweep = TRUE;
if (FIXNUM_P(ruby_gc_stress)) { if (FIXNUM_P(ruby_gc_stress)) {
int flag = ruby_gc_stress; int flag = FIX2INT(ruby_gc_stress);
if (flag & 0x01) minor_gc = TRUE; if (flag & 0x01) minor_gc = TRUE;
if (flag & 0x02) immediate_sweep = FALSE; if (flag & 0x02) immediate_sweep = FALSE;