lib/review/template.rb in review-5.1.1 vs lib/review/template.rb in review-5.2.0

- old
+ new

@@ -17,10 +17,14 @@ def initialize(filename = nil, mode = nil) return unless filename content = File.read(filename) - @erb = ERB.new(content, nil, mode) + @erb = if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6') + ERB.new(content, trim_mode: mode) + else + ERB.new(content, nil, mode) + end end def result(bind_data = nil) @erb.result(bind_data) end