зеркало из https://github.com/github/ruby.git
* proc.c (proc_new): use `ec` directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b1890fa136
Коммит
7df94b0f3d
6
proc.c
6
proc.c
|
@ -695,8 +695,8 @@ static VALUE
|
|||
proc_new(VALUE klass, int8_t is_lambda)
|
||||
{
|
||||
VALUE procval;
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
rb_control_frame_t *cfp = th->ec->cfp;
|
||||
const rb_execution_context_t *ec = GET_EC();
|
||||
rb_control_frame_t *cfp = ec->cfp;
|
||||
VALUE block_handler;
|
||||
|
||||
if ((block_handler = rb_vm_frame_block_handler(cfp)) == VM_BLOCK_HANDLER_NONE) {
|
||||
|
@ -747,7 +747,7 @@ proc_new(VALUE klass, int8_t is_lambda)
|
|||
|
||||
case block_handler_type_ifunc:
|
||||
case block_handler_type_iseq:
|
||||
return rb_vm_make_proc_lambda(th->ec, VM_BH_TO_CAPT_BLOCK(block_handler), klass, is_lambda);
|
||||
return rb_vm_make_proc_lambda(ec, VM_BH_TO_CAPT_BLOCK(block_handler), klass, is_lambda);
|
||||
}
|
||||
VM_UNREACHABLE(proc_new);
|
||||
return Qnil;
|
||||
|
|
Загрузка…
Ссылка в новой задаче