Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/org/jruby/ir/interpreter/Interpreter.java
Original file line number Diff line number Diff line change
@@ -570,7 +570,11 @@ private static IRubyObject interpret(ThreadContext context, IRubyObject self,
break;
case BOOK_KEEPING_OP:
if (operation == Operation.PUSH_BINDING) {
context.pushScope(interpreterContext.newDynamicScope(context));
// IMPORTANT: Preserve this update of currDynScope.
// This affects execution of all instructions in this scope
// which will now use the updated value of currDynScope.
currDynScope = interpreterContext.newDynamicScope(context);
context.pushScope(currDynScope);
} else {
processBookKeepingOp(context, instr, operation, name, args, self, block, implClass, visibility);
}

0 comments on commit ac42880

Please sign in to comment.