tool/generic_erb.rb: Use ERB#result_with_hash instead of #result
to prevent the warnings: ``` ./tool/generic_erb.rb:23: warning: assigned but unused variable - output ./tool/generic_erb.rb:24: warning: assigned but unused variable - vpath ```
This commit is contained in:
parent
98e9165b0a
commit
bd148a2bdd
@ -30,7 +30,7 @@ result = templates.map do |template|
|
||||
erb = ERB.new(File.read(template), nil, '%-')
|
||||
end
|
||||
erb.filename = template
|
||||
source ? erb.src : proc{erb.result(binding)}.call
|
||||
source ? erb.src : proc{erb.result_with_hash({ erb: erb, output: output, vpath: vpath })}.call
|
||||
end
|
||||
result = result.size == 1 ? result[0] : result.join("")
|
||||
out.write(result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user