mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* util.c (ruby_strtod): no need to check same digit for hexdigit
twice. [ruby-dev:45363][Bug #6146] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
375aedbfb4
commit
a258d6f415
2 changed files with 9 additions and 3 deletions
|
@ -1,4 +1,7 @@
|
|||
Thu Mar 15 15:04:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Mar 15 15:04:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* util.c (ruby_strtod): no need to check same digit for hexdigit
|
||||
twice. [ruby-dev:45363][Bug #6146]
|
||||
|
||||
* parse.y (sym_check_asciionly): check ascii compatibility before
|
||||
scanning for code range.
|
||||
|
|
7
util.c
7
util.c
|
@ -1977,8 +1977,11 @@ break2:
|
|||
nd0 = -4;
|
||||
|
||||
if (!*++s || !(s1 = strchr(hexdigit, *s))) goto ret0;
|
||||
while (*s == '0') s++;
|
||||
if ((s1 = strchr(hexdigit, *s)) != NULL) {
|
||||
if (*s == '0') {
|
||||
while (*++s == '0');
|
||||
s1 = strchr(hexdigit, *s);
|
||||
}
|
||||
if (s1 != NULL) {
|
||||
do {
|
||||
adj += aadj * ((s1 - hexdigit) & 15);
|
||||
nd0 += 4;
|
||||
|
|
Loading…
Reference in a new issue