diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-25 09:20:47 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-11-25 09:20:47 +0900 |
| commit | d77b25410880f0c79bd215c406ec44a9dac07769 (patch) | |
| tree | 5519faefa52478adce9d4b9ae5db892aa9c95912 /mrbgems/mruby-proc-ext/src/proc.c | |
| parent | 6905597f5b750e75e3320a5c9a74e4c270f155eb (diff) | |
| parent | 1ec5994377b45b0299a9c4e6e7ab275792d81bc9 (diff) | |
| download | mruby-d77b25410880f0c79bd215c406ec44a9dac07769.tar.gz mruby-d77b25410880f0c79bd215c406ec44a9dac07769.zip | |
Merge pull request #3287 from bouk/proc-arity
Fix calling .arity on Proc with undefined `initialize`
Diffstat (limited to 'mrbgems/mruby-proc-ext/src/proc.c')
| -rw-r--r-- | mrbgems/mruby-proc-ext/src/proc.c | 3 |
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); } |
