[前][次][番号順一覧][スレッド一覧]

ruby-changes:41827

From: headius <ko1@a...>
Date: Tue, 23 Feb 2016 08:22:49 +0900 (JST)
Subject: [ruby-changes:41827] headius:r53901 (trunk): * test/ruby/test_math.rb: override tests must always put to_f back

headius	2016-02-23 08:22:56 +0900 (Tue, 23 Feb 2016)

  New Revision: 53901

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53901

  Log:
    * test/ruby/test_math.rb: override tests must always put to_f back
    
    
    Conflicts:
    test/ruby/test_math.rb

  Modified files:
    trunk/test/ruby/test_math.rb
Index: test/ruby/test_math.rb
===================================================================
--- test/ruby/test_math.rb	(revision 53900)
+++ test/ruby/test_math.rb	(revision 53901)
@@ -288,7 +288,7 @@ class TestMath < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_math.rb#L288
     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 { undef to_f; alias to_f _to_f; undef _to_f }
   end
 
@@ -306,7 +306,7 @@ class TestMath < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_math.rb#L306
 
     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 { undef to_f; alias to_f _to_f; undef _to_f }
   end
 
@@ -325,7 +325,7 @@ class TestMath < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_math.rb#L325
     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 { undef to_f; alias to_f _to_f; undef _to_f }
   end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]