Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -2224,13 +2224,13 @@ public Operand buildEnsureInternal(Node ensureBodyNode, Node ensurerNode) {
getCurrentLoop(),
activeRescuers.peek());

ensureBodyBuildStack.push(ebi);

// Restore $! if we had a non-empty rescue node
// Record $! save var if we had a non-empty rescue node.
// $! will be restored from it where required.
if (ensureBodyNode != null && ensureBodyNode instanceof RescueNode) {
ebi.savedGlobalException = savedGlobalException;
}

ensureBodyBuildStack.push(ebi);
Operand ensureRetVal = ensurerNode == null ? manager.getNil() : build(ensurerNode);
ensureBodyBuildStack.pop();

0 comments on commit 99d77ac

Please sign in to comment.