aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/object.c b/object.c
index 49957c7bcb..afbcd61e28 100644
--- a/object.c
+++ b/object.c
@@ -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);