aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-10-20 20:45:47 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-10-21 14:05:20 +0900
commit665b4c5b2a31078d7db0173ad60daad0b463c1fd (patch)
treec8731db7daee020aaa65a2efb31e2984c1a0f1fc /tool
parent6d1ed3def8a79047b3e55dd3e6ddb83544794e02 (diff)
downloadruby-665b4c5b2a31078d7db0173ad60daad0b463c1fd.tar.gz
[Bug #19967] Reset `LIBPATHENV` env after started
Not to affect other tools invoked as child processes.
Diffstat (limited to 'tool')
-rw-r--r--tool/fake.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/fake.rb b/tool/fake.rb
index 91dfb041c4..195ae0a5a0 100644
--- a/tool/fake.rb
+++ b/tool/fake.rb
@@ -9,6 +9,14 @@ class File
end
end
+[[libpathenv, "."], [preloadenv, libruby_so]].each do |env, path|
+ env or next
+ e = ENV[env] or next
+ e = e.split(File::PATH_SEPARATOR)
+ e.delete(File.expand_path(path, builddir)) or next
+ ENV[env] = (e.join(File::PATH_SEPARATOR) unless e.empty?)
+end
+
static = !!(defined?($static) && $static)
$:.unshift(builddir)
posthook = proc do