From 29123a3799fd706b819c7e33b8125e2a6d262431 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 25 May 2016 08:13:37 +0000 Subject: 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 --- class.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'class.c') 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++; -- cgit v1.2.3