Skip to content

Commit

Permalink
[GGE::OPTable] cloned closure
Browse files Browse the repository at this point in the history
Triggered a nasty reentrancy bug if the closure wasn't manually cloned.
  • Loading branch information
Carl Masak committed May 21, 2010
1 parent 3f4bdd4 commit 686e6ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/GGE/OPTable.pm
Expand Up @@ -112,7 +112,8 @@ class GGE::OPTable {
$pos = $oper.to;
$expect = $token<expect> +> 8;
};
my &reduce = {
# RAKUDO: Need to manually clone the closure [perl #73034]
my &reduce = pir::clone({
my $top = pop @tokenstack;
my $oper = pop @operstack;
my $reduce = True;
Expand Down Expand Up @@ -161,7 +162,7 @@ class GGE::OPTable {
$pos = -1;
}
}
};
});
while $pos < $target.chars {
my $stop_matching = False;
if $stoptoken
Expand Down

0 comments on commit 686e6ed

Please sign in to comment.