aboutsummaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-25 08:13:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-25 08:13:37 +0000
commitc05cbc8eca4e691eb2d97f163c9eed0e67dcb385 (patch)
tree64a2af4da510fe14dce5f3720bc3bdc6a0065933 /class.c
parent6e2f656a6cafbd4d1046e1658b94890c8b5172cb (diff)
downloadruby-c05cbc8eca4e691eb2d97f163c9eed0e67dcb385.tar.gz
class.c: simplify
* class.c (rb_scan_args): merge code for n_trail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c14
1 files changed, 4 insertions, 10 deletions
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++;