json: 1.8.6
ruby: 2.7.2
rails: 6.0.3.6
I am frequently getting the following error in my application
/Users/***/.rvm/gems/ruby-2.7.2/gems/json-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
When I searched for this error I got a solution i.e., I need to update my json gem version but here I have many other dependencies on the json-1.8.6 version, So I cannot update the gem. When I update the code in common.rb file explicitly.
def parse(source, opts = {})
Parser.new(source, opts).parse
end
I have updated above code as follows
def parse(source, opts = {})
Parser.new(source, **opts).parse
end
It is working without any errors but I think it is not the correct way to disable the warning.