From db1075fdc7be4dbffc558fcb223410a335a42660 Mon Sep 17 00:00:00 2001
From: Jack Nagel <jacknagel@gmail.com>
Date: Tue, 20 Aug 2013 18:51:11 -0500
Subject: [PATCH] Use ENV.update to restore removed variables

---
 Library/Homebrew/formula.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index bb1d91687b..c54df055da 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -583,9 +583,7 @@ class Formula
     raise BuildError.new(self, cmd, args, $?)
   ensure
     f.close if f and not f.closed?
-    removed_ENV_variables.each do |key, value|
-      ENV[key] = value
-    end if removed_ENV_variables
+    ENV.update(removed_ENV_variables) if removed_ENV_variables
   end
 
   private
-- 
GitLab