From 64f0682d7da858cf49c5559513a838248f8efee5 Mon Sep 17 00:00:00 2001 From: marcandre Date: Wed, 25 Dec 2013 21:36:19 +0000 Subject: * proc.c: Having any mandatory keyword argument increases min arity [#9299] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 82f9e38ff2..1b61d71ac1 100644 --- a/proc.c +++ b/proc.c @@ -881,7 +881,7 @@ rb_iseq_min_max_arity(const rb_iseq_t *iseq, int *max) iseq->argc + iseq->arg_post_len + iseq->arg_opts - (iseq->arg_opts > 0) + (iseq->arg_keyword != -1) : UNLIMITED_ARGUMENTS; - return iseq->argc + iseq->arg_post_len; + return iseq->argc + iseq->arg_post_len + (iseq->arg_keyword_required > 0); } static int -- cgit v1.2.3