I wrote something like this in the past, it doesn't make sense in ruby.
The closest ruby way is:
result = DoStuff
return something if result.nil? # error, early exit
result = OtherStuff(result)
return something if result.nil? # error, early exit
No additional complexity. Otherwise usually it ends up just rewriting "programming".With pattern matching there are also some alternatives now.