summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2019-10-20 00:16:11 -0800
committerRyan Davis <ryand@zenspider.com>2019-10-20 00:16:11 -0800
commitc5e9b061520426d954a9b60b544f2482083a2a2d (patch)
tree5d2145d7ba5105a75d47a8b6b9f6d6c9a39a81d2 /bin
parentd43cedcf42695f27110d50ad7e4e6b0a90833848 (diff)
downloadhoe-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-xbin/sow6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/sow b/bin/sow
index 30b03b1..10de657 100755
--- a/bin/sow
+++ b/bin/sow
@@ -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