ruby-changes:48638
From: nobu <ko1@a...>
Date: Mon, 13 Nov 2017 10:58:23 +0900 (JST)
Subject: [ruby-changes:48638] nobu:r60753 (trunk): envutil.rb: preserve RUBYLIB
nobu 2017-11-13 10:58:18 +0900 (Mon, 13 Nov 2017) New Revision: 60753 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60753 Log: envutil.rb: preserve RUBYLIB * test/lib/envutil.rb (invoke_ruby): preserve RUBYLIB which is set by runruby.rb and necessary to load standard libraries. Modified files: trunk/test/lib/envutil.rb Index: test/lib/envutil.rb =================================================================== --- test/lib/envutil.rb (revision 60752) +++ test/lib/envutil.rb (revision 60753) @@ -42,6 +42,8 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L42 DEFAULT_SIGNALS = Signal.list DEFAULT_SIGNALS.delete("TERM") if /mswin|mingw/ =~ RUBY_PLATFORM + RUBYLIB = ENV["RUBYLIB"] + class << self attr_accessor :subprocess_timeout_scale end @@ -80,6 +82,9 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L82 if Array === args and Hash === args.first child_env.update(args.shift) end + if RUBYLIB and lib = child_env["RUBYLIB"] + child_env["RUBYLIB"] = [lib, RUBYLIB].join(File::PATH_SEPARATOR) + end args = [args] if args.kind_of?(String) pid = spawn(child_env, *precommand, rubybin, *args, **opt) in_c.close -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/