mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
[rubygems/rubygems] Do not override @orig_env
It is saved in `setup` and restored in `teardown`.
880c5de667
This commit is contained in:
parent
e3e1e53098
commit
e73f6618d5
1 changed files with 2 additions and 2 deletions
|
@ -535,12 +535,12 @@ class Gem::TestCase < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def with_env(overrides, &block)
|
||||
@orig_env = ENV.to_h
|
||||
orig_env = ENV.to_h
|
||||
ENV.replace(overrides)
|
||||
begin
|
||||
block.call
|
||||
ensure
|
||||
ENV.replace(@orig_env)
|
||||
ENV.replace(orig_env)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue