Commit 8ce5893e authored by Kazuki Tsujimoto's avatar Kazuki Tsujimoto

Use mrb_get_args instead of direct stack access

parent 5859a204
......@@ -53,8 +53,9 @@ mrb_proc_new_cfunc(mrb_state *mrb, mrb_func_t func)
static mrb_value
mrb_proc_initialize(mrb_state *mrb, mrb_value self)
{
mrb_value blk = mrb->stack[mrb->ci->argc+1];
mrb_value blk;
mrb_get_args(mrb, "&", &blk);
if (!mrb_nil_p(blk)) {
*mrb_proc_ptr(self) = *mrb_proc_ptr(blk);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment