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

ruby-changes:46533

From: eregon <ko1@a...>
Date: Wed, 10 May 2017 23:35:42 +0900 (JST)
Subject: [ruby-changes:46533] eregon:r58654 (trunk): Use environment values to find ruby and flags instead of an argument

eregon	2017-05-10 23:35:38 +0900 (Wed, 10 May 2017)

  New Revision: 58654

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

  Log:
    Use environment values to find ruby and flags instead of an argument

  Modified files:
    trunk/spec/rubyspec/core/process/fixtures/common.rb
    trunk/spec/rubyspec/core/process/fixtures/kill.rb
Index: spec/rubyspec/core/process/fixtures/common.rb
===================================================================
--- spec/rubyspec/core/process/fixtures/common.rb	(revision 58653)
+++ spec/rubyspec/core/process/fixtures/common.rb	(revision 58654)
@@ -46,7 +46,6 @@ module ProcessSpecs https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/process/fixtures/common.rb#L46
         Thread.current.abort_on_exception = true
         args = [@pid_file]
         args << scenario if scenario
-        args << RUBY_EXE.inspect if scenario
         @result = ruby_exe @script, args: args
       end
       Thread.pass while @thread.status and !File.exist?(@pid_file)
Index: spec/rubyspec/core/process/fixtures/kill.rb
===================================================================
--- spec/rubyspec/core/process/fixtures/kill.rb	(revision 58653)
+++ spec/rubyspec/core/process/fixtures/kill.rb	(revision 58654)
@@ -2,7 +2,6 @@ require 'thread' https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/process/fixtures/kill.rb#L2
 
 pid_file = ARGV.shift
 scenario = ARGV.shift
-ruby_exe = ARGV.shift
 
 # We must do this first otherwise there will be a race with the process that
 # creates this process and the TERM signal below could go to that process
@@ -40,7 +39,7 @@ if scenario https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/process/fixtures/kill.rb#L39
   end
 
   code = "Process.kill(#{signal}, #{process})"
-  system(*ruby_exe.split(' '), "-e", code)
+  system(ENV["RUBY_EXE"], *ENV["RUBY_FLAGS"].split(' '), "-e", code)
 end
 
 sleep 0.001 until mutex.locked? and $signaled

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

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