diff options
| author | ksss <[email protected]> | 2014-06-15 22:38:22 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2014-06-15 22:38:22 +0900 |
| commit | 907a29979071e14fd0cc00a56401ee1d55bef6c6 (patch) | |
| tree | ec9f4158d0c60ef7632724b77e2addf3da14cb5d /src/proc.c | |
| parent | 1cced27a7928a82241210ed5ccc47b9cdb9e8703 (diff) | |
| download | mruby-907a29979071e14fd0cc00a56401ee1d55bef6c6.tar.gz mruby-907a29979071e14fd0cc00a56401ee1d55bef6c6.zip | |
arity for cfunc is not implemented yet
Diffstat (limited to 'src/proc.c')
| -rw-r--r-- | src/proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/proc.c b/src/proc.c index da1a52e19..a61296ed4 100644 --- a/src/proc.c +++ b/src/proc.c @@ -149,9 +149,14 @@ mrb_proc_arity(mrb_state *mrb, mrb_value self) { struct RProc *p = mrb_proc_ptr(self); mrb_code *iseq = mrb_proc_iseq(mrb, p); - mrb_aspec aspec = GETARG_Ax(*iseq); + mrb_aspec aspec; int ma, ra, pa, arity; + if (MRB_PROC_CFUNC_P(p)) { + // TODO cfunc aspec not implemented yet + return mrb_fixnum_value(-1); + } + aspec = GETARG_Ax(*iseq); ma = MRB_ASPEC_REQ(aspec); ra = MRB_ASPEC_REST(aspec); pa = MRB_ASPEC_POST(aspec); |
