summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-13 01:58:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-13 01:58:18 +0000
commitfdb64a1a44ddfe519b212e60f4578c17741d0292 (patch)
treef97440109767b65b20fdd065173106e6f65d53b7 /test/lib
parent8020a87df07262723a7396a929256dd2f6f72406 (diff)
envutil.rb: preserve RUBYLIB
* test/lib/envutil.rb (invoke_ruby): preserve RUBYLIB which is set by runruby.rb and necessary to load standard libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/envutil.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb
index 45b6eb47fb..f44f0e9a65 100644
--- a/test/lib/envutil.rb
+++ b/test/lib/envutil.rb
@@ -42,6 +42,8 @@ module EnvUtil
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
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