summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:20:00 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:20:00 +0000
commit340f07e17e4cd0c751828e776cc7e36ee78d1485 (patch)
tree48f776aeb87415b5c2bc9387d480adfcc99d560a /object.c
parent9a1effadba37bb18aece8a6d34141aaf857292bd (diff)
merge revision(s) 16570:
* object.c (rb_cstr_to_dbl): should clear errno before calling strtod(3). [ruby-dev:34834] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/object.c b/object.c
index 5b2a255d0c..60df9b3386 100644
--- a/object.c
+++ b/object.c
@@ -2281,6 +2281,7 @@ rb_cstr_to_dbl(p, badcheck)
else {
while (ISSPACE(*p) || *p == '_') p++;
}
+ errno = 0;
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();