aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build_environment.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-07 09:15:56 -0500
committerJack Nagel2014-07-07 09:15:56 -0500
commit9e7f5dc2619839a17dbceb01c6708bab7753e73f (patch)
treecf2a607d78df91da362dda1212744819db42988c /Library/Homebrew/build_environment.rb
parentaeccba8dbedb18d5fa28a453435825e766da4979 (diff)
downloadbrew-9e7f5dc2619839a17dbceb01c6708bab7753e73f.tar.bz2
Merge instead of calling << in a loop
Diffstat (limited to 'Library/Homebrew/build_environment.rb')
-rw-r--r--Library/Homebrew/build_environment.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/build_environment.rb b/Library/Homebrew/build_environment.rb
index e6dbf9734..d46e4bfb2 100644
--- a/Library/Homebrew/build_environment.rb
+++ b/Library/Homebrew/build_environment.rb
@@ -6,6 +6,10 @@ class BuildEnvironment
@procs = Set.new
end
+ def merge(*args)
+ @settings.merge(*args)
+ end
+
def <<(o)
case o
when Proc then @procs << o
@@ -41,7 +45,7 @@ module BuildEnvironmentDSL
if block_given?
@env << block
else
- settings.each { |s| @env << s }
+ @env.merge(settings)
end
@env
end