summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 5 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 524b188b29..f68740f2a1 100644
--- a/parse.y
+++ b/parse.y
@@ -1679,6 +1679,7 @@ yycompile(f)
ruby__end__seen = 0;
ruby_eval_tree = 0;
newline_seen = 0;
+ heredoc_end = 0;
ruby_sourcefile = f;
ruby_in_compile = 1;
n = yyparse();
@@ -2420,8 +2421,8 @@ arg_ambiguous()
rb_warning("ambiguous first argument; make sure");
}
-#ifndef atof
-double atof();
+#ifndef strtod
+double strtod ();
#endif
static int
@@ -2866,7 +2867,8 @@ retry:
if (is_float) {
double d = strtod(tok(), 0);
if (errno == ERANGE) {
- yyerror("Float out of range");
+ rb_warn("Float %s out of range", tok());
+ errno = 0;
}
yylval.val = rb_float_new(d);
return tFLOAT;