summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-15 10:48:10 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-15 10:48:10 +0000
commit1d53405b313631315b38a0c524cf9ff02589bfb1 (patch)
tree4a8c7c9d40e19575fc36dd8415ae2fb3f8b7a01e
parent880a96c795d30d95497cb216c8bfc7fa1b3b5387 (diff)
* 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
-rw-r--r--ChangeLog7
-rw-r--r--object.c4
-rw-r--r--parse.y2
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 322474c97d..b939245fde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/object.c b/object.c
index 39d6d866fe..e863edb8da 100644
--- a/object.c
+++ b/object.c
@@ -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) {
diff --git a/parse.y b/parse.y
index f98d0c3700..ae66688f0e 100644
--- a/parse.y
+++ b/parse.y
@@ -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));