How we automatically fixed thousands of Ruby 2.7 deprecation warnings | GitLab

To address this warning, the obvious, and boring solution was to simply add ** to the last keyword argument. For the most part, this is what we did. However, while this was under way, we also developed a RuboCop check that could detect, and automatically fix the keyword arguments. The benefit for this approach was that we can autocorrect any existing warnings en masse.The tricky part about this is that RuboCop is designed to statically analyze Ruby code, whereas the warnings were generated by Ruby at runtime.
How we automatically fixed thousands of Ruby 2.7 deprecation warnings | GitLab #ruby #rubydeveloper #rubyonrails https://www.rubyonrails.ba/single/how-we-automatically-fixed-thousands-of-ruby-2-7-deprecation-warnings-gitlab

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles