From 78008d342e7bd31d706f6c71465505e912209a3c Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 1 May 2008 12:47:07 +0000 Subject: * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- rational.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rational.c') diff --git a/rational.c b/rational.c index 82cb0298a5..a81ffe1611 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); } -- cgit v1.2.3