Skip to content
Snippets Groups Projects
Commit 9e7f5dc2 authored by Jack Nagel's avatar Jack Nagel
Browse files

Merge instead of calling << in a loop

parent aeccba8d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -104,7 +104,7 @@ class Options
end
def concat(o)
o.each { |opt| @options << opt }
@options.merge(o)
self
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment