aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_math.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 07:58:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 07:58:09 +0000
commitc7f815eed897a8d78b19e041a569d2667a403f4a (patch)
tree90af8141d302f84fea9294733db66b5544062254 /test/ruby/test_math.rb
parent41f4317f45021460871bd11c666f438f5517904b (diff)
downloadruby-c7f815eed897a8d78b19e041a569d2667a403f4a.tar.gz
test/ruby: suppress runtime warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r--test/ruby/test_math.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb
index f2805a2d74..72ed987719 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -289,7 +289,7 @@ class TestMath < Test::Unit::TestCase
check(Math.exp((0 + 1)._to_f), Math.exp(0))
check(Math.log((0 + 1)._to_f), Math.log(0))
- Fixnum.class_eval { alias to_f _to_f }
+ Fixnum.class_eval { undef to_f; alias to_f _to_f; undef _to_f }
end
def test_bignum_to_f
@@ -307,7 +307,7 @@ class TestMath < Test::Unit::TestCase
check(Math.cos((1 << 62 << 1)._to_f), Math.cos(1 << 62))
check(Math.log((1 << 62 << 1)._to_f), Math.log(1 << 62))
- Bignum.class_eval { alias to_f _to_f }
+ Bignum.class_eval { undef to_f; alias to_f _to_f; undef _to_f }
end
def test_rational_to_f
@@ -326,6 +326,6 @@ class TestMath < Test::Unit::TestCase
check(Math.exp((0r + 1)._to_f), Math.exp(0r))
check(Math.log((0r + 1)._to_f), Math.log(0r))
- Rational.class_eval { alias to_f _to_f }
+ Rational.class_eval { undef to_f; alias to_f _to_f; undef _to_f }
end
end