summaryrefslogtreecommitdiff
path: root/test/ruby/test_math.rb
diff options
context:
space:
mode:
authorheadius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-22 22:44:23 +0000
committerheadius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-22 22:44:23 +0000
commit6863c40970388cd4358230589df39a2fc9033f00 (patch)
treeff16fc2c9b4b3c3991cb2b2afc04e799055a6abd /test/ruby/test_math.rb
parent0bd3a5241270ed9eb440dc1c9d517a540925dffc (diff)
* test/ruby/test_math.rb: override tests must always put to_f back
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@53897 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..6ab48fc7c8 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -288,7 +288,7 @@ class TestMath < Test::Unit::TestCase
check(Math.cos((0 + 1)._to_f), Math.cos(0))
check(Math.exp((0 + 1)._to_f), Math.exp(0))
check(Math.log((0 + 1)._to_f), Math.log(0))
-
+ ensure
Fixnum.class_eval { alias to_f _to_f }
end
@@ -306,7 +306,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))
-
+ ensure
Bignum.class_eval { alias to_f _to_f }
end
@@ -325,7 +325,7 @@ class TestMath < Test::Unit::TestCase
check(Math.cos((0r + 1)._to_f), Math.cos(0r))
check(Math.exp((0r + 1)._to_f), Math.exp(0r))
check(Math.log((0r + 1)._to_f), Math.log(0r))
-
+ ensure
Rational.class_eval { alias to_f _to_f }
end
end