Warning about ERB.new being deprecated
ansonlos opened this issue · 3 comments
ansonlos commented
Am getting the following warnings every time doing (ver 1.0.35) is executed:
/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/global_help_format.rb:37: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/global_help_format.rb:37: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/command_help_format.rb:28: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
Any way to suppress these warnings?
ttscoff commented
doing depends on the GLI gem, and it sounds like GLI needs to be updated
for Ruby 3. I'm not even sure the project is still active, so this might
be problematic.
I mean, you could redirect all STDERR output using `doing ... 2>
/dev/null` but that's not really a solution, and the error message seems
to indicate this is going to break entirely in the future.
I'll see if there's hope for GLI updating itself.
…-Brett
On 9 Feb 2021, at 23:08, Anson wrote:
Am getting the following warnings every time doing (ver 1.0.35) is
executed:
/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/global_help_format.rb:37:
warning: Passing safe_level with the 2nd argument of ERB.new is
deprecated. Do not use it, and specify other arguments as keyword
arguments.
/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/global_help_format.rb:37:
warning: Passing trim_mode with the 3rd argument of ERB.new is
deprecated. Use keyword argument like ERB.new(str, trim_mode: ...)
instead.
/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/command_help_format.rb:28:
warning: Passing safe_level with the 2nd argument of ERB.new is
deprecated. Do not use it, and specify other arguments as keyword
arguments.
Any way to suppress these warnings?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#118
ttscoff commented
Got a fix for this upstream, should be able to release a new gem update shortly.
ansonlos commented
I can confirm the latest update to the GLI gem (ver. 2.20.0) has now fixed the issue. The warnings no longer appear.
Thanks Brett!