Ruby has implicit returns. This means that if a return
is the last expression in a path of execution, there's no need for the return
keyword.
Worth noting is that return
's default argument is nil
, which is a falsey value.
def foo
do_stuff
return
end