summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 11:28:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 11:28:56 +0000
commit7fd58845d907d218538a39d829ccb4090c784618 (patch)
treed030bffc9c40969ceae98ec0e74d1915722fc6bc /proc.c
parentc8185b327ea68ce125937c977b2b158a90f27561 (diff)
proc.c: fix arity of rest keywords argument
* proc.c (rb_iseq_min_max_arity): maximum argument is unlimited if having rest keywords argument. [ruby-core:53298] [Bug #8072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44413 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 9de48a053f..36f1653996 100644
--- a/proc.c
+++ b/proc.c
@@ -877,7 +877,7 @@ proc_arity(VALUE self)
static inline int
rb_iseq_min_max_arity(const rb_iseq_t *iseq, int *max)
{
- *max = iseq->arg_rest == -1 ?
+ *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;