1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* object.c (rb_cstr_to_dbl): no need for forceful warning when

converting to float.  overflow is a nature of float values.

* parse.y (parser_yylex): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-05-15 10:48:10 +00:00
parent 880a96c795
commit 1d53405b31
3 changed files with 10 additions and 3 deletions

View file

@ -7,6 +7,13 @@ Thu May 15 15:33:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_extname): ditto.
Thu May 15 13:43:36 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (rb_cstr_to_dbl): no need for forceful warning when
converting to float. overflow is a nature of float values.
* parse.y (parser_yylex): ditto.
Thu May 15 13:23:20 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* re.c (rb_reg_prepare_enc): error condition was updated for non

View file

@ -2048,7 +2048,7 @@ rb_cstr_to_dbl(const char *p, int badcheck)
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();
rb_warn("Float %.*s%s out of range", w, p, ellipsis);
rb_warning("Float %.*s%s out of range", w, p, ellipsis);
errno = 0;
}
if (p == end) {
@ -2086,7 +2086,7 @@ rb_cstr_to_dbl(const char *p, int badcheck)
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();
rb_warn("Float %.*s%s out of range", w, p, ellipsis);
rb_warning("Float %.*s%s out of range", w, p, ellipsis);
errno = 0;
}
if (badcheck) {

View file

@ -6777,7 +6777,7 @@ parser_yylex(struct parser_params *parser)
if (is_float) {
double d = strtod(tok(), 0);
if (errno == ERANGE) {
rb_warnS("Float %s out of range", tok());
rb_warningS("Float %s out of range", tok());
errno = 0;
}
set_yylval_literal(DOUBLE2NUM(d));