Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make grep-index work when returning into an array
This feels like a work around for some obscure scoping issue.
  • Loading branch information
lizmat committed Apr 28, 2014
1 parent ab7b1fe commit 3a69624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Any.pm
Expand Up @@ -130,7 +130,7 @@ my class Any { # declared in BOOTSTRAP
}
method grep-index(Mu $test) {
my $index = -1;
self.map: { $index++; $index if $_ ~~ $test };
self.map: { $index++; +$index if $_ ~~ $test };
}
method first(Mu $test) is rw {
self.map({ return $_ if $_ ~~ $test });
Expand Down

0 comments on commit 3a69624

Please sign in to comment.