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

ruby-changes:53956

From: naruse <ko1@a...>
Date: Tue, 4 Dec 2018 09:40:54 +0900 (JST)
Subject: [ruby-changes:53956] naruse:r66176 (trunk): Use Dir.home to avoid platform dependency

naruse	2018-12-04 09:40:48 +0900 (Tue, 04 Dec 2018)

  New Revision: 66176

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

  Log:
    Use Dir.home to avoid platform dependency
    
    On Solaris 10, `echo ~#{ENV['USER']}` As expected

  Modified files:
    trunk/spec/ruby/core/file/expand_path_spec.rb
Index: spec/ruby/core/file/expand_path_spec.rb
===================================================================
--- spec/ruby/core/file/expand_path_spec.rb	(revision 66175)
+++ spec/ruby/core/file/expand_path_spec.rb	(revision 66176)
@@ -89,7 +89,7 @@ describe "File.expand_path" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/expand_path_spec.rb#L89
   platform_is_not :windows do
     before do
       @var_home = ENV['HOME'].chomp('/')
-      @db_home = `/bin/echo ~#{ENV['USER']}`.chomp
+      @db_home = Dir.home
     end
 
     # FIXME: these are insane!

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

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