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

ruby-changes:53940

From: naruse <ko1@a...>
Date: Mon, 3 Dec 2018 18:55:09 +0900 (JST)
Subject: [ruby-changes:53940] naruse:r66160 (trunk): Use /bin/echo instead of shell builtin echo

naruse	2018-12-03 18:55:05 +0900 (Mon, 03 Dec 2018)

  New Revision: 66160

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

  Log:
    Use /bin/echo instead of shell builtin echo
    
    builtin echo of Solaris 10's sh doesn't expand `~`.
    https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181203T061807Z.fail.html.gz

  Modified files:
    trunk/spec/ruby/core/dir/home_spec.rb
    trunk/spec/ruby/core/file/expand_path_spec.rb
Index: spec/ruby/core/dir/home_spec.rb
===================================================================
--- spec/ruby/core/dir/home_spec.rb	(revision 66159)
+++ spec/ruby/core/dir/home_spec.rb	(revision 66160)
@@ -16,7 +16,7 @@ describe "Dir.home" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/dir/home_spec.rb#L16
 
   platform_is_not :windows do
     it "returns the named user's home directory, from the user database, as a string if called with an argument" do
-      Dir.home(ENV['USER']).should == `echo ~#{ENV['USER']}`.chomp
+      Dir.home(ENV['USER']).should == `/bin/echo ~#{ENV['USER']}`.chomp
     end
   end
 
Index: spec/ruby/core/file/expand_path_spec.rb
===================================================================
--- spec/ruby/core/file/expand_path_spec.rb	(revision 66159)
+++ spec/ruby/core/file/expand_path_spec.rb	(revision 66160)
@@ -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 = `echo ~#{ENV['USER']}`.chomp
+      @db_home = `/bin/echo ~#{ENV['USER']}`.chomp
     end
 
     # FIXME: these are insane!

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

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