1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_eval.c: fix misplaced GC guard

* vm_eval.c (vm_call0_body): fix RB_GC_GUARD location
  (check_funcall_exec): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-03-07 10:21:28 +00:00
parent 537ee14ff4
commit bd1104f3dd
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Fri Mar 7 19:14:11 2014 Eric Wong <e@80x24.org>
* vm_eval.c (vm_call0_body): fix RB_GC_GUARD location
(check_funcall_exec): ditto
[Bug #9609]
Fri Mar 7 14:48:17 2014 Narihiro Nakamura <authornari@gmail.com>
* parse.y (ENC_SINGLE): Unused macro removed.

View file

@ -210,10 +210,11 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
{
VALUE new_args = rb_ary_new4(ci->argc, argv);
RB_GC_GUARD(new_args);
rb_ary_unshift(new_args, ID2SYM(ci->mid));
th->passed_block = ci->blockptr;
return rb_funcall2(ci->recv, idMethodMissing, ci->argc+1, RARRAY_PTR(new_args));
ret = rb_funcall2(ci->recv, idMethodMissing, ci->argc+1, RARRAY_PTR(new_args));
RB_GC_GUARD(new_args);
return ret;
}
case VM_METHOD_TYPE_OPTIMIZED:
switch (ci->me->def->body.optimize_type) {
@ -338,11 +339,13 @@ static VALUE
check_funcall_exec(struct rescue_funcall_args *args)
{
VALUE new_args = rb_ary_new4(args->argc, args->argv);
VALUE ret;
RB_GC_GUARD(new_args);
rb_ary_unshift(new_args, args->sym);
return rb_funcall2(args->recv, idMethodMissing,
ret = rb_funcall2(args->recv, idMethodMissing,
args->argc+1, RARRAY_PTR(new_args));
RB_GC_GUARD(new_args);
return ret;
}
static VALUE