summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--class.c14
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c8dada447..1020dc620d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed May 25 17:13:35 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * class.c (rb_scan_args): merge code for n_trail.
+
Wed May 25 17:11:34 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (rb_scan_args_validate): move failed
diff --git a/class.c b/class.c
index 20f26fa873..9d91cf73a8 100644
--- a/class.c
+++ b/class.c
@@ -1901,22 +1901,16 @@ 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 == '*') {
f_var = 1;
p++;
- if (ISDIGIT(*p)) {
- n_trail = *p - '0';
- p++;
- }
}
- block_arg:
+ if (ISDIGIT(*p)) {
+ n_trail = *p - '0';
+ p++;
+ }
if (*p == ':') {
f_hash = 1;
p++;