summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-01 08:25:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-01 08:25:05 +0000
commit4a223fb67f31a1a85a0b4fb019a1106532a541ce (patch)
tree6771eaa4bb34b39a36d359cac45a5bcb6b3783c2 /compile.c
parent06c7ede25923582b7f61c85920cd195b3c0447ce (diff)
compile.c: not simple if keyword args
* compile.c (iseq_set_arguments): not a simple single argument if any keyword arguments exist. [ruby-core:55203] [Bug #8463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 70db48c..e0ca056 100644
--- a/compile.c
+++ b/compile.c
@@ -1276,7 +1276,8 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
}
if (iseq->type == ISEQ_TYPE_BLOCK) {
- if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 && iseq->arg_rest == -1) {
+ if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 &&
+ iseq->arg_rest == -1 && iseq->arg_keyword == -1) {
if (iseq->argc == 1 && last_comma == 0) {
/* {|a|} */
iseq->arg_simple |= 0x02;