1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Set GEM_PATH environment variable in runruby.rb

This commit is contained in:
Nobuyoshi Nakada 2022-07-13 23:50:02 +09:00
parent 416cba90c1
commit 9d900620ca
Notes: git 2022-07-14 09:00:39 +09:00

View file

@ -122,6 +122,12 @@ if e = ENV["RUBYLIB"]
end
env["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR)
gem_path = [abs_archdir, srcdir].map {|d| File.realdirpath(".bundle", d)}
if e = ENV["GEM_PATH"]
gem_path |= e.split(File::PATH_SEPARATOR)
end
env["GEM_PATH"] = gem_path.join(File::PATH_SEPARATOR)
libruby_so = File.join(abs_archdir, config['LIBRUBY_SO'])
if File.file?(libruby_so)
if e = config['LIBPATHENV'] and !e.empty?