pub(crate) fn create_proc(&mut self, block: &Block) -> Value {
        match block {
            Block::Block(method, outer) => {
                let outer = self.cfp_from_frame(*outer);
                let self_val = outer.self_value();
                Value::procobj(self, self_val, *method, outer)
            }
            Block::Proc(proc) => *proc,
            Block::Sym(sym) => {
                let fid = Codegen::gen_sym_to_proc_iseq(&mut self.globals, *sym);
                Value::procobj(self, Value::nil(), fid, self.caller_cfp())
            }
        }
    }
Create new Proc object from `block`,
moving outer `Context`s on stack to heap.
ruruby/src/vm/executor.rs