Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix comb version of the match with take bug fixed earlier today in sp…
…lit.
  • Loading branch information
colomon committed Apr 29, 2010
1 parent 0857098 commit ed321b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/Cool-str.pm
Expand Up @@ -42,7 +42,12 @@ augment class Cool {
my $c = 0;
my $l = $limit ~~ ::Whatever ?? Inf !! $limit;
gather while $l > 0 && (my $m = self.match($matcher, :c($c))) {
take $match ?? $m !! ~$m;
if $match {
my $m-clone = $m;
take $m-clone;
} else {
take ~$m;
}
$c = $m.to == $c ?? $c + 1 !! $m.to;
--$l;
}
Expand Down

0 comments on commit ed321b4

Please sign in to comment.