diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-04-24 12:06:39 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 12:39:31 -0700 |
commit | 3a23b71f0ac76d52f334643ab3152017c7a10b39 (patch) | |
tree | 3a33989487af3c68b14f56c9818a4fbdab1106ae /iseq.c | |
parent | fa41a7b2608523a89d4eb1c9309d39a140e839ef (diff) |
Make Method/Proc#parameters handle **nil syntax
Use a [:nokey] entry in this case.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2933,6 +2933,12 @@ rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc) rb_ary_push(args, PARAM(i, req)); } } + if (body->param.flags.accepts_no_kwarg) { + ID nokey; + CONST_ID(nokey, "nokey"); + PARAM_TYPE(nokey); + rb_ary_push(args, a); + } if (body->param.flags.has_kw) { i = 0; if (keyword->required_num > 0) { |