mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
adjustment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ac5a0ca4d
commit
8429f2be9f
1 changed files with 9 additions and 10 deletions
19
bignum.c
19
bignum.c
|
@ -470,16 +470,15 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*str == '0') { /* squeeze preceding 0s */
|
if (*str == '0') { /* squeeze preceding 0s */
|
||||||
int nn = 0;
|
int us = 0;
|
||||||
while ((c = *++str) == '0' || c == '_') {
|
while ((c = *++str) == '0' || c == '_') {
|
||||||
if (c == '_') {
|
if (c == '_') {
|
||||||
nn++;
|
if (++us >= 2)
|
||||||
if (nn >= 2)
|
break;
|
||||||
break;
|
} else
|
||||||
} else
|
us = 0;
|
||||||
nn = 0;
|
}
|
||||||
}
|
if (!(c = *str) || ISSPACE(c)) --str;
|
||||||
if (!(c = *str) || ISSPACE(c)) --str;
|
|
||||||
}
|
}
|
||||||
c = *str;
|
c = *str;
|
||||||
c = conv_digit(c);
|
c = conv_digit(c);
|
||||||
|
|
Loading…
Add table
Reference in a new issue