Re:Utilities for refactoring and upgrading Ruby code based o...
by dolni on Tuesday May 07, 2024 @09:44AM
(#40285378)
Worse than that, Rubocop will complain about things that change the meaning of your code.
For example, Rubocop’s default configuration insists on calling “.zero?” over using “== 0”. Not all objects have a “.zero?” method, and even if they did it isn’t guaranteed to be the same as “== 0”.
For example, Rubocop’s default configuration insists on calling “.zero?” over using “== 0”. Not all objects have a “.zero?” method, and even if they did it isn’t guaranteed to be the same as “== 0”.