Ruby

Ruby

By DeepSource

Literal is used as condition RB-LI1031

Anti-pattern

Literals used in conditions are pointless, as the programmer already knows if the condition will evaluate to true or false.