Ruby

Ruby

Made by DeepSource

Empty ensure block detected RB-LI1016

Bug risk
Major
Autofix

The ensure block must not be empty.

Bad practice

begin some_method
  do_something
ensure
end

Recommended

def some_method
  do_something
ensure
  do_something_else
end