Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix caddr fallback test
$0 is always true because (<[ad]>*) always matches, needs $0 ne ''
  • Loading branch information
TimToady committed Mar 15, 2014
1 parent 3182fbd commit b13f601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integration/advent2013-day09.t
Expand Up @@ -100,7 +100,7 @@ Pair.^add_fallback(
-> $p {
$name ~~ /^c(<[ad]>*)(<[ad]>)r$/; # split out last 'a' or 'd'
my $r = $1 eq 'a' ?? $p.key !! $p.value; # choose key or value
$0 ?? $r."c{$0}r"() !! $r; # maybe recurse
$0 ne '' ?? $r."c{$0}r"() !! $r; # maybe recurse
}
}
);
Expand Down

0 comments on commit b13f601

Please sign in to comment.