Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix $_ handling in binder.
Gets S02-names/pseudo.t working, and probably more.
  • Loading branch information
jnthn committed Jun 21, 2013
1 parent 51d0246 commit ea42160
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/vm/jvm/runtime/org/perl6/rakudo/Binder.java
Expand Up @@ -482,7 +482,14 @@ private static SixModelObject handleOptional(ThreadContext tc, Ops.GlobalExt gcx
if ((flags & SIG_ELEM_DEFAULT_FROM_OUTER) != 0) {
param.get_attribute_native(tc, gcx.Parameter, "$!variable_name", HINT_variable_name);
String varName = tc.native_s;
return cf.outer.oLex[cf.outer.codeRef.staticInfo.oTryGetLexicalIdx(varName)];
CallFrame curOuter = cf.outer;
while (curOuter != null) {
Integer idx = curOuter.codeRef.staticInfo.oTryGetLexicalIdx(varName);
if (idx != null)
return curOuter.oLex[idx];
curOuter = curOuter.outer;
}
return null;
}

/* Do we have a default value or value closure? */
Expand Down

0 comments on commit ea42160

Please sign in to comment.