diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2022-11-18 14:45:21 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2022-11-18 14:45:21 +0900 |
commit | e19afe36ca64b261f25622219d570720fd20a28e (patch) | |
tree | 60b2bcf351e41a9f29f93654472eb952aa7b2ba6 /tool | |
parent | 096ffebbbf1f4a5bbdb3abb4b8335b43645cc870 (diff) | |
download | ruby-e19afe36ca64b261f25622219d570720fd20a28e.tar.gz |
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)
```
Diffstat (limited to 'tool')
-rw-r--r-- | tool/generic_erb.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb index 1bb740900a..47bffd830c 100644 --- a/tool/generic_erb.rb +++ b/tool/generic_erb.rb @@ -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) |