diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-27 16:15:22 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-27 16:15:22 +0000 |
commit | 30492d9d53f1d79c1713f3ed4e7c623cd1490884 (patch) | |
tree | d1a1a231217f995729fe6bdc6d0b5a62579689ce /object.c | |
parent | 471e41ec70e18339f72539a6331dcf2fb80d2238 (diff) | |
download | ruby-30492d9d53f1d79c1713f3ed4e7c623cd1490884.tar.gz |
* object.c (rb_cstr_to_dbl): should not skip '_' at the beginning
of a string. [ruby-dev:28830]
* bignum.c (rb_cstr_to_inum): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -2066,12 +2066,7 @@ rb_cstr_to_dbl(const char *p, int badcheck) if (!p) return 0.0; q = p; - if (badcheck) { - while (ISSPACE(*p)) p++; - } - else { - while (ISSPACE(*p) || *p == '_') p++; - } + while (ISSPACE(*p)) p++; d = strtod(p, &end); if (errno == ERANGE) { rb_warn("Float %*s out of range", end-p, p); |