Update method_missing in Gitlab::Lazy for ruby 3 kwarg support
What does this MR do and why?
Currently method_missing
does not support ruby 3's new keyword arguments syntax (see https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)
We ignored those failures in spec/deprecation_toolkit_env.rb
, with this MR we fix the issue so it is compliant with Ruby 3's new syntax.
Decided to go with ...
in favor of ruby2_keywords
, because ruby2_keywords
is set for removal in the future
How to set up and validate locally
This can be tested by specs;
if using the old syntax (and removing lib/gitlab/lazy.rb
from spec/deprecation_toolkit_env.rb
), certain specs will fail with a deprecation warning. With the new syntax there will be no failures.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #356367 (closed)