summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 78661fb1f..03b046d6d 100644
--- a/eval.c
+++ b/eval.c
@@ -8530,7 +8530,7 @@ rb_proc_arity(VALUE proc)
list = list->nd_next;
}
if (var->nd_args) {
- if (nd_type(var->nd_args) == NODE_POSTARG) {
+ if (var->nd_args != (NODE *)-1 && nd_type(var->nd_args) == NODE_POSTARG) {
return -n-1-var->nd_args->nd_head->nd_alen;
}
return -n-1;