From 941ffcf40358ae3c4b534e191091b590ebe0ab72 Mon Sep 17 00:00:00 2001 From: Soudai Sasada Date: Mon, 25 Dec 2023 07:45:08 +0900 Subject: [PATCH] Call ERB initializer with correct arguments (#78) --- lib/squasher/render.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/squasher/render.rb b/lib/squasher/render.rb index 6aa5367..57e6326 100644 --- a/lib/squasher/render.rb +++ b/lib/squasher/render.rb @@ -14,7 +14,11 @@ def initialize(name, config) end def render - ERB.new(template("#{ name }.rb"), nil, '-').result(binding) + if RUBY_VERSION < '2.6' + ERB.new(template("#{ name }.rb"), nil, '-').result(binding) + else + ERB.new(template("#{ name }.rb"), trim_mode: '-').result(binding) + end end def each_schema_line(&block)