summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-04-24 12:06:39 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commit3a23b71f0ac76d52f334643ab3152017c7a10b39 (patch)
tree3a33989487af3c68b14f56c9818a4fbdab1106ae /iseq.c
parentfa41a7b2608523a89d4eb1c9309d39a140e839ef (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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index b6d8c7224a..1b0aefbf92 100644
--- a/iseq.c
+++ b/iseq.c
@@ -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) {