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

ruby-changes:29701

From: nobu <ko1@a...>
Date: Wed, 3 Jul 2013 14:12:10 +0900 (JST)
Subject: [ruby-changes:29701] nobu:r41753 (trunk): test/ruby: independent from pathname

nobu	2013-07-03 14:11:58 +0900 (Wed, 03 Jul 2013)

  New Revision: 41753

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

  Log:
    test/ruby: independent from pathname
    
    * test/ruby/test_dir.rb (TestDir#setup): remove dependency on pathname.
    
    * test/ruby/test_rubyoptions.rb (TestRubyOptions#with_tmpchdir): ditto.

  Modified files:
    trunk/test/ruby/test_dir.rb
    trunk/test/ruby/test_rubyoptions.rb

Index: test/ruby/test_dir.rb
===================================================================
--- test/ruby/test_dir.rb	(revision 41752)
+++ test/ruby/test_dir.rb	(revision 41753)
@@ -2,14 +2,13 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L2
 
 require 'tmpdir'
 require 'fileutils'
-require 'pathname'
 
 class TestDir < Test::Unit::TestCase
 
   def setup
     @verbose = $VERBOSE
     $VERBOSE = nil
-    @root = Pathname.new(Dir.mktmpdir('__test_dir__')).realpath.to_s
+    @root = File.realpath(Dir.mktmpdir('__test_dir__'))
     @nodir = File.join(@root, "dummy")
     for i in ?a..?z
       if i.ord % 2 == 0
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 41752)
+++ test/ruby/test_rubyoptions.rb	(revision 41753)
@@ -3,7 +3,6 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L3
 
 require 'tmpdir'
 require 'tempfile'
-require 'pathname'
 
 require_relative 'envutil'
 
@@ -16,7 +15,7 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L15
 
   def with_tmpchdir
     Dir.mktmpdir {|d|
-      d = Pathname.new(d).realpath.to_s
+      d = File.realpath(d)
       Dir.chdir(d) {
         yield d
       }

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

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