Ruby: Don't a add return in ensure

Updated . Posted . Visible to the public.

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
Last edit
dncrht
Tags
Posted by Dragos Miron to HouseTrip Deck (2013-04-18 10:15)