Ruby

Ruby

Made by DeepSource

Found pattern branch without a body RB-W1003

Anti-pattern
Minor

In case you want to return nil from a case body, it is better to return it explicitly. Otherwise the intent of the code may seem ambiguous.

Bad practice

case condition
in [a]
  do_something
in [a, b]
end

Recommended

case condition
in [a]
  do_something
in [a, b]
  nil
end