lib/aruba/api/core.rb in aruba-0.11.2 vs lib/aruba/api/core.rb in aruba-0.12.0

- old
+ new

@@ -177,11 +177,13 @@ # @yield # The block of code which should be run with the changed environment variables def with_environment(env = {}, &block) old_aruba_env = aruba.environment.to_h + # make sure the old environment is really restored in "ENV" Aruba.platform.with_environment aruba.environment.update(env).to_h, &block ensure + # make sure the old environment is really restored in "aruba.environment" aruba.environment.clear aruba.environment.update old_aruba_env end end end