Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -2225,10 +2225,10 @@ public Operand buildEnsureInternal(Node ensureBodyNode, Node ensurerNode) {
activeRescuers.peek());

ensureBodyBuildStack.push(ebi);
Operand ensureRetVal = ensurerNode == null ? manager.getNil() : build(ensurerNode);
// Restore $!
addInstr(new PutGlobalVarInstr("$!", savedGlobalException));
ebi.savedGlobalException = savedGlobalException;
Operand ensureRetVal = ensurerNode == null ? manager.getNil() : build(ensurerNode);
ensureBodyBuildStack.pop();

// ------------ Build the protected region ------------

0 comments on commit 74db0b7

Please sign in to comment.