Skip to content

Commit

Permalink
Fix deprecated usage of ERB.new
Browse files Browse the repository at this point in the history
It fixes the following warning (Since Ruby 3.1):

  Rakefile:168: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
  Rakefile:168: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

This does not change the content of fluent-package.

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys committed Oct 7, 2024
1 parent ab0fef3 commit b0dde24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fluent-package/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def render_template(dest, src, config, opts={})
logger.info("Generate #{dest}")
ensure_directory(directory)
File.open(dest, 'w', mode) do |f|
template = ERB.new(File.read(src), nil, '<>')
template = ERB.new(File.read(src), trim_mode: '<>')
f.write(template.result(erb_binding))
end
end
Expand Down

0 comments on commit b0dde24

Please sign in to comment.