summaryrefslogtreecommitdiffstats
path: root/rational.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-01 12:47:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-01 12:47:07 +0000
commit55ff769bf4c569a51a7c5bc164f76e5d1e4ebd12 (patch)
tree02ba214e3806bd189714b9d0503799cb79e601f8 /rational.c
parenta830576fb53c458e8456f73f1527a7e16d9c9062 (diff)
downloadruby-55ff769bf4c569a51a7c5bc164f76e5d1e4ebd12.tar.gz
ruby-55ff769bf4c569a51a7c5bc164f76e5d1e4ebd12.tar.xz
ruby-55ff769bf4c569a51a7c5bc164f76e5d1e4ebd12.zip
* test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value):
shut up warning. * rational.c (nurat_to_f): no need for forceful warning when converting to float. overflow is a nature of float values. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rational.c b/rational.c
index 82cb0298a..a81ffe161 100644
--- a/rational.c
+++ b/rational.c
@@ -1130,7 +1130,7 @@ nurat_to_f(VALUE self)
e = (int)(ne - de);
if ((e > DBL_MAX_EXP) || (e < DBL_MIN_EXP)) {
- rb_warn("%s out of Float range", rb_obj_classname(self));
+ rb_warning("%s out of Float range", rb_obj_classname(self));
return rb_float_new(e > 0 ? HUGE_VAL : 0.0);
}
@@ -1140,7 +1140,7 @@ nurat_to_f(VALUE self)
f = ldexp(f, e);
if (isinf(f) || isnan(f))
- rb_warn("%s out of Float range", rb_obj_classname(self));
+ rb_warning("%s out of Float range", rb_obj_classname(self));
return rb_float_new(f);
}