1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* error.c (rb_warn_m): should not warn if -W0 is specified.

[ruby-talk:82675]

* util.c (ruby_strtod): skip preceding zeros before counting
  digits in the mantissa. (ruby-bugs PR#1181)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-09-24 23:56:11 +00:00
parent 5747a6c480
commit 94bfebb3fa
4 changed files with 19 additions and 0 deletions

7
util.c
View file

@ -757,6 +757,13 @@ ruby_strtod(string, endPtr)
sign = FALSE;
}
/* skip preceding zeros */
if (*p == '0') {
while (*p == '0')
p++;
p--;
}
/*
* Count the number of digits in the mantissa (including the decimal
* point), and also locate the decimal point.