summaryrefslogtreecommitdiff
path: root/tool/generic_erb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/generic_erb.rb')
-rw-r--r--tool/generic_erb.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb
index c9986c7..83c569b 100644
--- a/tool/generic_erb.rb
+++ b/tool/generic_erb.rb
@@ -34,7 +34,11 @@ unchanged = color.pass("unchanged")
updated = color.fail("updated")
result = templates.map do |template|
- erb = ERB.new(File.read(template), nil, '%-')
+ if RUBY_VERSION >= '2.6'
+ erb = ERB.new(File.read(template), trim_mode: '%-')
+ else
+ erb = ERB.new(File.read(template), nil, '%-')
+ end
erb.filename = template
source ? erb.src : proc{erb.result(binding)}.call
end