Unverified Commit 5c75dc9e authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5625 from dearblue/proc_new

Assign after `mrb_irep_incref()` in `mrb_proc_new()`
parents 4e0b1622 bee96654
...@@ -67,10 +67,10 @@ mrb_proc_new(mrb_state *mrb, const mrb_irep *irep) ...@@ -67,10 +67,10 @@ mrb_proc_new(mrb_state *mrb, const mrb_irep *irep)
p->upper = ci->proc; p->upper = ci->proc;
p->e.target_class = tc; p->e.target_class = tc;
} }
p->body.irep = irep;
if (irep) { if (irep) {
mrb_irep_incref(mrb, (mrb_irep*)irep); mrb_irep_incref(mrb, (mrb_irep*)irep);
} }
p->body.irep = irep;
return p; return p;
} }
......
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