Project

General

Profile

Bug #16522

Ruby 2.7 logs deprecation warning when Warning[:deprecated] is set to false.

Added by snehasomwanshi@gmail.com (Sneha Somwanshi) 3 months ago. Updated 3 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:96969]

Description

Hi

While upgrading our monolithic app to ruby 2.7, we realised that ruby 2.7 is not suppressing all deprecation warnings.

Here is the test case:

~/dev/freeagent (ruby_2_7_0 *%) $ ruby -W:no-deprecated -e 'require "json"; JSON::Ext::Parser.new("hello", {})'
-e:1: warning: Using the last argument as keyword parameters is deprecated

The warning is originating from https://github.com/ruby/ruby/blob/647ee6f091eafcce70ffb75ddf7e121e192ab217/class.c#L2054 and setting Warning[:deprecated] = false or RUBYOPT=-W:no-deprecated -W:no-experimental does not suppress this warning.

Also available in: Atom PDF