tool/generic_erb.rb: Add a hack to prevent "unused variable" warnings
This commit is contained in:
parent
e19afe36ca
commit
417f3cd893
@ -23,6 +23,9 @@ end
|
|||||||
output = out.path
|
output = out.path
|
||||||
vpath = out.vpath
|
vpath = out.vpath
|
||||||
|
|
||||||
|
# A hack to prevent "unused variable" warnings
|
||||||
|
output, vpath = output, vpath
|
||||||
|
|
||||||
result = templates.map do |template|
|
result = templates.map do |template|
|
||||||
if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
|
if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
|
||||||
erb = ERB.new(File.read(template), trim_mode: '%-')
|
erb = ERB.new(File.read(template), trim_mode: '%-')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user