Pattern: Unreachable code
Issue: -
This rule checks for unreachable code. The check are based on the presence of flow of control statement in non-final position in begin
(implicit) blocks.
# bad
def some_method
return
do_something
end
# bad
def some_method
if cond
return
else
return
end
do_something
end
# good
def some_method
do_something
end