diff options
author | Ryan Davis <ryand@zenspider.com> | 2019-10-20 00:16:11 -0800 |
---|---|---|
committer | Ryan Davis <ryand@zenspider.com> | 2019-10-20 00:16:11 -0800 |
commit | c5e9b061520426d954a9b60b544f2482083a2a2d (patch) | |
tree | 5d2145d7ba5105a75d47a8b6b9f6d6c9a39a81d2 /bin | |
parent | d43cedcf42695f27110d50ad7e4e6b0a90833848 (diff) | |
download | hoe-c5e9b061520426d954a9b60b544f2482083a2a2d.tar.gz |
- Fixed sow for ruby 2.6 deprecations in ERB. (felipec)
[git-p4: depot-paths = "//src/hoe/dev/": change = 12347]
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sow | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -117,7 +117,11 @@ Dir.chdir project do warn "erb: #{path}" File.open path, "w" do |io| - erb = ERB.new file, nil, "<>" + if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ + erb = ERB.new file, trim_mode: "<>" + else + erb = ERB.new file, nil, "<>" + end erb.filename = path io.puts erb.result(binding) end |