Subject: break from block
From: "Farrel Lifson" <farrel.lifson gmail.com>
Date: Fri, 20 Oct 2006 22:45:40 +0900
I've just run into the following problem. Doing this:
block = lambda{|i| i > 5 ? break : nil}
n.times &block
raises a LocalJumpError, I assume because break is not valid from
within a Proc object. Is there any way to get around this?
Farrel