summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-proc-ext/src
diff options
context:
space:
mode:
authorFrancois Chagnon <[email protected]>2016-11-14 16:49:45 -0500
committerBouke van der Bijl <[email protected]>2016-11-24 10:23:31 -0500
commit1ec5994377b45b0299a9c4e6e7ab275792d81bc9 (patch)
tree855977357c0ac152e2246b94ff27c31fbafe1df1 /mrbgems/mruby-proc-ext/src
parenta630c4f413f6af764e68210430e8b61a435d38d7 (diff)
downloadmruby-1ec5994377b45b0299a9c4e6e7ab275792d81bc9.tar.gz
mruby-1ec5994377b45b0299a9c4e6e7ab275792d81bc9.zip
Fix calling .arity on Proc with undefined `initialize`
Reported by @bouk
Diffstat (limited to 'mrbgems/mruby-proc-ext/src')
-rw-r--r--mrbgems/mruby-proc-ext/src/proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c
index c8c8f1aa1..34f6230dc 100644
--- a/mrbgems/mruby-proc-ext/src/proc.c
+++ b/mrbgems/mruby-proc-ext/src/proc.c
@@ -114,6 +114,9 @@ mrb_proc_parameters(mrb_state *mrb, mrb_value self)
// TODO cfunc aspec is not implemented yet
return mrb_ary_new(mrb);
}
+ if (!irep) {
+ return mrb_ary_new(mrb);
+ }
if (!irep->lv) {
return mrb_ary_new(mrb);
}