ruby-changes:53386
From: nobu <ko1@a...>
Date: Wed, 7 Nov 2018 19:55:30 +0900 (JST)
Subject: [ruby-changes:53386] nobu:r65603 (trunk): Generalize r65594
nobu 2018-11-07 19:55:24 +0900 (Wed, 07 Nov 2018) New Revision: 65603 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65603 Log: Generalize r65594 Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 65602) +++ test/ruby/test_process.rb (revision 65603) @@ -263,7 +263,7 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L263 } end - MANDATORY_ENVS = %w[RUBYLIB] + MANDATORY_ENVS = %w[RUBYLIB MJIT_SEARCH_BUILD_DIR] case RbConfig::CONFIG['target_os'] when /linux/ MANDATORY_ENVS << 'LD_PRELOAD' @@ -271,11 +271,13 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L271 MANDATORY_ENVS.concat(%w[HOME USER TMPDIR]) when /darwin/ MANDATORY_ENVS.concat(ENV.keys.grep(/\A__CF_/)) - MANDATORY_ENVS.concat(['MJIT_SEARCH_BUILD_DIR', 'DYLD_INSERT_LIBRARIES']) # set on tool/runruby.rb (ruby-runner.c) end if e = RbConfig::CONFIG['LIBPATHENV'] MANDATORY_ENVS << e end + if e = RbConfig::CONFIG['PRELOADENV'] and !e.empty? + MANDATORY_ENVS << e + end PREENVARG = ['-e', "%w[#{MANDATORY_ENVS.join(' ')}].each{|e|ENV.delete(e)}"] ENVARG = ['-e', 'ENV.each {|k,v| puts "#{k}=#{v}" }'] ENVCOMMAND = [RUBY].concat(PREENVARG).concat(ENVARG) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/