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 c1c60714e2..dca59471ce 100644
--- a/object.c
+++ b/object.c
@@ -2045,6 +2045,7 @@ rb_cstr_to_dbl(const char *p, int badcheck)
if (!p) return 0.0;
q = p;
while (ISSPACE(*p)) p++;
+ errno = 0;
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();