Gitlab::Lazy and use of Ruby 3 kwargs
We discovered in !71753 (comment 879856975) that using Gitlab::Lazy
can result in kwargs
deprecation warnings, which currently fails the build.
I am not sure yet whether the fix proposed in the MR is correct (adding a kwargs
parameter), since the stdlib method_missing
impl does itself not define kwargs
:
def method_missing m, *a, &b
t = @@golf_hash[ [m, self.class] ] ||= matching_methods(m)[0]
if t && b
__send__(t, *a) {|*args|
b.binding.eval("proc{|golf_matchdata| $~ = golf_matchdata }").call($~) if $~
b.call(*args)
}
else
t ? __send__(t, *a, &b) : super
end
end
We need to see what is the right way to address this.
Once this is fixed, we should remove the silence we added in !71753 (merged).