Just Googled it and apparently yes. Nice idea in my opinion - if a language has an idiom on the right way to do something, make a linter tell you that. I wouldn't know myself, I've only ever used Ruby for hobby projects years ago when I just started learning to program. Fun language.
10
u/uvero 19h ago
In Ruby, if you want to branch based on whether x is zero where x is a number, you can always check for
x == 0, or, if you're feeling cool,x.zero?