Backport #7658 » vm.c.patch
vm.c | ||
---|---|---|
}
|
||
static VALUE vm_make_proc_from_block(rb_thread_t *th, rb_block_t *block);
|
||
static VALUE vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp, VALUE *blockprocptr);
|
||
VALUE
|
||
rb_vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp)
|
||
{
|
||
VALUE blockprocval;
|
||
return vm_make_env_object(th, cfp, &blockprocval);
|
||
}
|
||
VALUE
|
||
vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp, VALUE *blockprocptr)
|
||
{
|
||
VALUE envval;
|
||
VALUE *lfp;
|
||
rb_block_t *blockptr;
|
||
... | ... | |
rb_proc_t *p;
|
||
GetProcPtr(blockprocval, p);
|
||
lfp[0] = GC_GUARDED_PTR(&p->block);
|
||
*blockprocptr = blockprocval;
|
||
}
|
||
envval = vm_make_env_each(th, cfp, cfp->dfp, cfp->lfp);
|
||
... | ... | |
rb_bug("rb_vm_make_proc: Proc value is already created.");
|
||
}
|
||
envval = rb_vm_make_env_object(th, cfp);
|
||
envval = vm_make_env_object(th, cfp, &blockprocval);
|
||
if (PROCDEBUG) {
|
||
check_env_value(envval);
|