* 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:
parent
b1890fa136
commit
7df94b0f3d
6
proc.c
6
proc.c
@ -695,8 +695,8 @@ static VALUE
|
|||||||
proc_new(VALUE klass, int8_t is_lambda)
|
proc_new(VALUE klass, int8_t is_lambda)
|
||||||
{
|
{
|
||||||
VALUE procval;
|
VALUE procval;
|
||||||
rb_thread_t *th = GET_THREAD();
|
const rb_execution_context_t *ec = GET_EC();
|
||||||
rb_control_frame_t *cfp = th->ec->cfp;
|
rb_control_frame_t *cfp = ec->cfp;
|
||||||
VALUE block_handler;
|
VALUE block_handler;
|
||||||
|
|
||||||
if ((block_handler = rb_vm_frame_block_handler(cfp)) == VM_BLOCK_HANDLER_NONE) {
|
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_ifunc:
|
||||||
case block_handler_type_iseq:
|
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);
|
VM_UNREACHABLE(proc_new);
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user