Skip to content

Commit

Permalink
Unbreak serialization of langs
Browse files Browse the repository at this point in the history
In NQP, a `sub` ends up in the serialization context, while a pointy
block does not. This gets P5builtins passing its tests again, but the
couple of warnings about lang/braid misuse remain, and need checking
more closely. Part of dealing with #2637.
  • Loading branch information
jnthn committed Jan 25, 2019
1 parent f7ba400 commit 9517c37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/World.nqp
Expand Up @@ -1219,11 +1219,11 @@ class Perl6::World is HLL::World {
for $arglist {
%dyn{$_} := 1;
}
$*LANG.set_pragma('dynamic-scope', -> $var { %dyn{$var} || 0 });
$*LANG.set_pragma('dynamic-scope', sub ($var) { %dyn{$var} || 0 });
}
else {
# All variables.
$*LANG.set_pragma('dynamic-scope', -> $var { 1 });
$*LANG.set_pragma('dynamic-scope', sub ($var) { 1 });
}
}
else {
Expand Down

0 comments on commit 9517c37

Please sign in to comment.