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
This commit is contained in:
parent
8020a87df0
commit
fdb64a1a44
@ -42,6 +42,8 @@ module EnvUtil
|
|||||||
DEFAULT_SIGNALS = Signal.list
|
DEFAULT_SIGNALS = Signal.list
|
||||||
DEFAULT_SIGNALS.delete("TERM") if /mswin|mingw/ =~ RUBY_PLATFORM
|
DEFAULT_SIGNALS.delete("TERM") if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||||
|
|
||||||
|
RUBYLIB = ENV["RUBYLIB"]
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
attr_accessor :subprocess_timeout_scale
|
attr_accessor :subprocess_timeout_scale
|
||||||
end
|
end
|
||||||
@ -80,6 +82,9 @@ module EnvUtil
|
|||||||
if Array === args and Hash === args.first
|
if Array === args and Hash === args.first
|
||||||
child_env.update(args.shift)
|
child_env.update(args.shift)
|
||||||
end
|
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)
|
args = [args] if args.kind_of?(String)
|
||||||
pid = spawn(child_env, *precommand, rubybin, *args, **opt)
|
pid = spawn(child_env, *precommand, rubybin, *args, **opt)
|
||||||
in_c.close
|
in_c.close
|
||||||
|
Loading…
x
Reference in New Issue
Block a user