summaryrefslogtreecommitdiffhomepage
path: root/src/proc.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2022-01-03 08:54:01 +0900
committerGitHub <[email protected]>2022-01-03 08:54:01 +0900
commit5c75dc9edcc7b744226f3eddd2922b2d55c10187 (patch)
tree6ab0131ba1de1c692a59393a3eebbf1e31ce4722 /src/proc.c
parent4e0b1622536ea43dae3f628f4f2ca02727bcc428 (diff)
parentbee9665400e12f01929524e3d1f3686e1e2e950d (diff)
downloadmruby-5c75dc9edcc7b744226f3eddd2922b2d55c10187.tar.gz
mruby-5c75dc9edcc7b744226f3eddd2922b2d55c10187.zip
Merge pull request #5625 from dearblue/proc_new
Assign after `mrb_irep_incref()` in `mrb_proc_new()`
Diffstat (limited to 'src/proc.c')
-rw-r--r--src/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proc.c b/src/proc.c
index 01a69fbf1..abace39de 100644
--- a/src/proc.c
+++ b/src/proc.c
@@ -67,10 +67,10 @@ mrb_proc_new(mrb_state *mrb, const mrb_irep *irep)
p->upper = ci->proc;
p->e.target_class = tc;
}
- p->body.irep = irep;
if (irep) {
mrb_irep_incref(mrb, (mrb_irep*)irep);
}
+ p->body.irep = irep;
return p;
}