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

ruby-changes:28913

From: nobu <ko1@a...>
Date: Tue, 28 May 2013 01:48:46 +0900 (JST)
Subject: [ruby-changes:28913] nobu:r40966 (trunk): test_method.rb: fix for direct invocation

nobu	2013-05-28 01:48:18 +0900 (Tue, 28 May 2013)

  New Revision: 40966

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

  Log:
    test_method.rb: fix for direct invocation
    
    * test/ruby/test_method.rb (TestMethod#test___dir__): use aboslute
      path for the case invoked directly.

  Modified files:
    trunk/test/ruby/test_method.rb

Index: test/ruby/test_method.rb
===================================================================
--- test/ruby/test_method.rb	(revision 40965)
+++ test/ruby/test_method.rb	(revision 40966)
@@ -553,7 +553,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L553
 
   def test___dir__
     assert_instance_of String, __dir__
-    assert_equal(File.dirname(__FILE__), __dir__)
+    assert_equal(File.expand_path("..", __FILE__), __dir__)
   end
 
   def test_alias_owner

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

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