From 27682eefa468b7bc2800fcf92d87e60cb62133a9 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 25 Dec 2013 13:44:18 +0000 Subject: compile.c: unnamed keyword rest check * compile.c (iseq_set_arguments): set arg_keyword_check from nd_cflag, which is set by parser. internal ID is used for unnamed keyword rest argument, which should be separated from no keyword check. * iseq.c (rb_iseq_parameters): if no keyword check, keyword rest is present. * parse.y (new_args_tail_gen): set keywords check to nd_cflag, which equals to that keyword rest is not present. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 1b33c559e3..a829089ea4 100644 --- a/iseq.c +++ b/iseq.c @@ -2015,8 +2015,10 @@ rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc) } rb_ary_push(args, a); } - CONST_ID(keyrest, "keyrest"); - rb_ary_push(args, PARAM(iseq->arg_keyword, keyrest)); + if (!iseq->arg_keyword_check) { + CONST_ID(keyrest, "keyrest"); + rb_ary_push(args, PARAM(iseq->arg_keyword, keyrest)); + } } if (iseq->arg_block != -1) { CONST_ID(block, "block"); -- cgit v1.2.3