diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-07-30 22:07:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-07-30 22:58:01 +0900 |
| commit | 8c9e7127845f84fcbb249c45936c97a89ca7a80a (patch) | |
| tree | 3862b06b6b04c2b275307e73ca7172473786d035 /mrbgems/mruby-proc-ext | |
| parent | 891839b976c75c77f238931123ac472e3284e95d (diff) | |
| download | mruby-8c9e7127845f84fcbb249c45936c97a89ca7a80a.tar.gz mruby-8c9e7127845f84fcbb249c45936c97a89ca7a80a.zip | |
Keyword argument implemented.
Diffstat (limited to 'mrbgems/mruby-proc-ext')
| -rw-r--r-- | mrbgems/mruby-proc-ext/src/proc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c index 323529dcc..9ce6c1831 100644 --- a/mrbgems/mruby-proc-ext/src/proc.c +++ b/mrbgems/mruby-proc-ext/src/proc.c @@ -149,7 +149,15 @@ mrb_proc_parameters(mrb_state *mrb, mrb_value self) a = mrb_ary_new(mrb); mrb_ary_push(mrb, a, sname); if (i < max && irep->lv[i].name) { - mrb_ary_push(mrb, a, mrb_symbol_value(irep->lv[i].name)); + mrb_sym sym = irep->lv[i].name; + const char *name = mrb_sym2name(mrb, sym); + switch (name[0]) { + case '*': case '&': + break; + default: + mrb_ary_push(mrb, a, mrb_symbol_value(sym)); + break; + } } mrb_ary_push(mrb, parameters, a); } |
