Skip to content

Commit

Permalink
Call ERB initializer with correct arguments (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
soudai-s authored Dec 24, 2023
1 parent b5e3b92 commit 941ffcf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/squasher/render.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 941ffcf

Please sign in to comment.