aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 13:44:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 13:44:18 +0000
commit27682eefa468b7bc2800fcf92d87e60cb62133a9 (patch)
tree36c7a921d51b7a75593bad75a9185e0c24dc6501 /iseq.c
parent05ae2b730dba04585d4c775a61d395d62bc3f205 (diff)
downloadruby-27682eefa468b7bc2800fcf92d87e60cb62133a9.tar.gz
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
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c6
1 files changed, 4 insertions, 2 deletions
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");