summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2022-10-15 16:35:48 +0900
committernagachika <nagachika@ruby-lang.org>2022-10-15 16:35:48 +0900
commit50496fb1788ea5d8c98d7946ed567c071a451d12 (patch)
tree1431a95623658b390a6d43274f01119f1c78175b /tool
parentcc745f2da175d1658aa2923d65a964848e96d001 (diff)
merge revision(s) 9d900620cafc379f527ee04a338f3a7f5daf6962:
Set `GEM_PATH` environment variable in runruby.rb --- tool/runruby.rb | 6 ++++++ 1 file changed, 6 insertions(+)
Diffstat (limited to 'tool')
-rwxr-xr-xtool/runruby.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/runruby.rb b/tool/runruby.rb
index bff5d031cc..d9a4c855d3 100755
--- a/tool/runruby.rb
+++ b/tool/runruby.rb
@@ -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?