Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -1899,6 +1899,8 @@ protected void receiveNonBlockArgs(final ArgsNode argsNode) {
// We add this extra nil copy because we do not know if we have a circular defininition of
// argVar: proc { |a=a| } or proc { |a = foo(bar(a))| }.
addInstr(new CopyInstr(argVar, manager.getNil()));
// This bare build looks weird but OptArgNode is just a marker and value is either a LAsgnNode
// or a DAsgnNode. So building the value will end up having a copy(var, assignment).
build(optArg.getValue());
addInstr(new LabelInstr(variableAssigned));
}

0 comments on commit b352b2d

Please sign in to comment.