summaryrefslogtreecommitdiff
path: root/tool/lib
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-11-04 15:36:30 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-11-04 15:36:30 -0400
commit6d835901575d58e7db404665801a1c455ee982a8 (patch)
tree55e39ff3fb76ef4e88779126be7062e166948165 /tool/lib
parent367c072ac6910e487a7619f61baebe1b4a6cf315 (diff)
downloadruby-6d835901575d58e7db404665801a1c455ee982a8.tar.gz
Don't report changed ENV caused by Bundler
Bundler's backups changes environment variables starting with BUNDLER_ORIG_. This causes a lot of noise in tests as the leakchecker reports them as changed.
Diffstat (limited to 'tool/lib')
-rw-r--r--tool/lib/leakchecker.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb
index 26d75b92fa..1966145588 100644
--- a/tool/lib/leakchecker.rb
+++ b/tool/lib/leakchecker.rb
@@ -234,6 +234,9 @@ class LeakChecker
new_env = find_env
return false if old_env == new_env
(old_env.keys | new_env.keys).sort.each {|k|
+ # Don't report changed environment variables caused by Bundler's backups
+ next if k.start_with?(Bundler::EnvironmentPreserver::BUNDLER_PREFIX)
+
if old_env.has_key?(k)
if new_env.has_key?(k)
if old_env[k] != new_env[k]