Ruby: Don't a add return in ensure

This method won't throw an error:

def a_method
  raise
ensure
  return :something
end

it will in fact return :something

So please proceed with care :)

Dragos Miron over 8 years ago
This website uses short-lived cookies to improve usability.
Accept or learn more