summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-01 08:25:29 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-01 08:25:29 +0000
commit7a620ac5306bd5cb44fbd5a0ecefed3a63410046 (patch)
tree1fc77e52dbc561669724da1c0f3da609ffa4ddd1 /proc.c
parent038540f9319b5b8fb7d4b809f82e1da63c47c0ba (diff)
merge revision(s) 44433: [Backport #9299]
* proc.c: Having any mandatory keyword argument increases min arity [#9299] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 78851ac547..9c88ada316 100644
--- a/proc.c
+++ b/proc.c
@@ -828,7 +828,7 @@ rb_iseq_min_max_arity(const rb_iseq_t *iseq, int *max)
*max = (iseq->arg_rest == -1 && iseq->arg_keyword == -1) ?
iseq->argc + iseq->arg_post_len + iseq->arg_opts - (iseq->arg_opts > 0)
: UNLIMITED_ARGUMENTS;
- return iseq->argc + iseq->arg_post_len;
+ return iseq->argc + iseq->arg_post_len + (iseq->arg_keyword_required > 0);
}
static int