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

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.
This commit is contained in:
Peter Zhu 2022-11-04 15:36:30 -04:00
parent 367c072ac6
commit 6d83590157

View file

@ -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]