Browse files

[IR] While handling breaks, distinguish between regular lambdas and

method-body lambdas (from define_method).  We ought to fix this
define_method thing in the runtime more cleanly by treating it as a
linker directive and creating a regular method body rather than continue
to hack it using closures.
  • Loading branch information...
1 parent dc3c2d3 commit 19e66aa8406cfa3d566d5a6604bc776a51801da7 @subbuss subbuss committed Apr 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/org/jruby/ir/interpreter/
@@ -572,7 +572,7 @@ private static IRubyObject interpret(ThreadContext context, IRubyObject self,
} catch (IRBreakJump bj) {
if ((lastInstr instanceof BreakInstr) || bj.breakInEval) {
handleBreakJump(context, scope, bj, self, blockType, inClosure);
- } else if (inLambda(blockType)) {
+ } else if (inNonMethodBodyLambda(scope, blockType)) {
// We just unwound all the way up because of a non-local break
throw IRException.BREAK_LocalJumpError.getException(runtime);
} else if (bj.caughtByLambda || (bj.scopeToReturnTo == scope)) {

0 comments on commit 19e66aa

Please sign in to comment.