T S Vallender

Just used “ensure” in Ruby exception handling for—I think—the first time. Immediately got confused by it! Even if it’s the last thing occurring in a method, the last line isn’t the return value of the method unless you explicitly return it. I presume things are getting handed back up the stack in a way that loses the value, but should investigate the behaviour to understand it when I have time.
Tags: