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

ruby-changes:39324

From: nobu <ko1@a...>
Date: Mon, 27 Jul 2015 21:00:27 +0900 (JST)
Subject: [ruby-changes:39324] nobu:r51405 (trunk): test/unit.rb: suppress warnings

nobu	2015-07-27 21:00:10 +0900 (Mon, 27 Jul 2015)

  New Revision: 51405

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

  Log:
    test/unit.rb: suppress warnings
    
    * test/lib/test/unit.rb (MiniTest::Unit::TestCase.test_order): get
      rid of warnings.

  Modified files:
    trunk/test/lib/test/unit.rb
Index: test/lib/test/unit.rb
===================================================================
--- test/lib/test/unit.rb	(revision 51404)
+++ test/lib/test/unit.rb	(revision 51405)
@@ -986,11 +986,12 @@ end https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L986
 
 class MiniTest::Unit::TestCase # :nodoc: all
   test_order = self.test_order
-  def self.test_order
-    @test_order || superclass.test_order
-  end
   class << self
     attr_writer :test_order
+    undef test_order
+  end
+  def self.test_order
+    defined?(@test_order) ? @test_order : superclass.test_order
   end
   self.test_order = test_order
   undef run_test

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

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