diff options
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -2993,8 +2993,7 @@ proc_curry(int argc, const VALUE *argv, VALUE self) int sarity, max_arity, min_arity = rb_proc_min_max_arity(self, &max_arity); VALUE arity; - rb_scan_args(argc, argv, "01", &arity); - if (NIL_P(arity)) { + if (rb_check_arity(argc, 0, 1) == 0 || NIL_P(arity = argv[0])) { arity = INT2FIX(min_arity); } else { |