Skip to content

Commit

Permalink
Make ERB tests pass on Ruby 2.3
Browse files Browse the repository at this point in the history
ERB in version 2.3 used '' instead of String.new as the base for
the template code, which doesn't work when using frozen string
literals.
  • Loading branch information
jeremyevans committed Feb 17, 2023
1 parent a467f83 commit 82857cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/tilt_erbtemplate_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
f.delete
end

if RUBY_VERSION >= '2.3'
if RUBY_VERSION >= '2.4'
it "uses frozen literal strings if :freeze option is used" do
template = Tilt::ERBTemplate.new(nil, :freeze => true) { |t| %(<%= "".frozen? %>) }
assert_equal "true", template.render
Expand Down

0 comments on commit 82857cd

Please sign in to comment.