From 484cd5a13e6608cc620f4b1871fb528491f5e7c5 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 29 Oct 2017 15:31:47 +0000 Subject: [PATCH] * vm_eval.c (current_vm_stack_arg): accepts `ec`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm_eval.c b/vm_eval.c index fe52b9c04b..9815673287 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -850,10 +850,10 @@ rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE pas } static VALUE * -current_vm_stack_arg(rb_thread_t *th, const VALUE *argv) +current_vm_stack_arg(const rb_execution_context_t *ec, const VALUE *argv) { - rb_control_frame_t *prev_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->ec->cfp); - if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th->ec, prev_cfp)) return NULL; + rb_control_frame_t *prev_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(ec->cfp); + if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, prev_cfp)) return NULL; if (prev_cfp->sp + 1 != argv) return NULL; return prev_cfp->sp + 1; } @@ -889,7 +889,7 @@ send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope) rb_exc_raise(exc); } if (!SYMBOL_P(*argv)) { - VALUE *tmp_argv = current_vm_stack_arg(rb_ec_thread_ptr(ec), argv); + VALUE *tmp_argv = current_vm_stack_arg(ec, argv); vid = rb_str_intern(vid); if (tmp_argv) { tmp_argv[0] = vid;