Revert "tool/generic_erb.rb: Use ERB#result_with_hash instead of #result"

This reverts commit bd148a2bdd0c1a4d7679eedcd649171cdb4234d7.

ERB#result_with_hash does not work on Ruby 2.2

https://ci.appveyor.com/project/ruby/ruby/builds/45420170
```
../tool/generic_erb.rb:33:in `block (2 levels) in <main>': undefined method `result_with_hash' for #<ERB:0x0000000002516650> (NoMethodError)
```
This commit is contained in:
Yusuke Endoh 2022-11-18 14:45:21 +09:00
parent 096ffebbbf
commit e19afe36ca

View File

@ -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_with_hash({ erb: erb, output: output, vpath: vpath })}.call
source ? erb.src : proc{erb.result(binding)}.call
end
result = result.size == 1 ? result[0] : result.join("")
out.write(result)