summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/class.c b/class.c
index 7ba47e4e26..a75a789ce9 100644
--- a/class.c
+++ b/class.c
@@ -934,6 +934,11 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
if (ISDIGIT(*p)) {
n_opt = *p - '0';
p++;
+ if (ISDIGIT(*p)) {
+ n_trail = *p - '0';
+ p++;
+ goto block_arg;
+ }
}
}
if (*p == '*') {
@@ -944,6 +949,7 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
p++;
}
}
+ block_arg:
if (*p == '&') {
f_block = 1;
p++;