Re:Nerd Sniping: What does the code do at the end of the page?
by wvl on Tuesday November 24, 2009 @07:46PM
(#960334)
Here's a good article that explains what happens:
http://blog.leshill.org/blog/2009/11/17/ensure-with-explicit...
Re:Nerd Sniping: What does the code do at the end of the page?
by ahlatimer on Tuesday November 24, 2009 @07:42PM
(#960324)
The last trick question doesn't work in Ruby, at least not Ruby 1.8.7. Gives me a "LocalJumpError: unexpected next".
I realize that's not the point, but I figured I'd mention it anyway.
It's not really a "paradox" so much as it is very bad style to "return" from a "finally".
Edit
My partner Dave has a much better trick question:
"You win", I told him. "Nah, Google won. But nobody really wins if you write code like that."