Skip to content

Commit

Permalink
tool/generic_erb.rb: Use ERB#result_with_hash instead of #result
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
mame committed Nov 18, 2022
1 parent 98e9165 commit bd148a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tool/generic_erb.rb
Expand Up @@ -30,7 +30,7 @@
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)

0 comments on commit bd148a2

Please sign in to comment.