summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
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();