Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -1657,6 +1657,9 @@ private IRMethod defineMethodInner(MethodDefNode defNode, IRMethod method, IRSco

addInstr(method, new ReceiveSelfInstr(method.getSelf()));


// These instructions need to be toward the top of the method because they may both be needed for
// processing optional arguments as in def foo(a = Object).
// Set %current_scope = <current-scope>
// Set %current_module = isInstanceMethod ? %self.metaclass : %self
int nearestScopeDepth = parent.getNearestModuleReferencingScopeDepth();

0 comments on commit c93c7bb

Please sign in to comment.