Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Any.subst() is not global by default, only if :g is present
  • Loading branch information
moritz committed Jan 4, 2010
1 parent 8817454 commit fe1e749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Any-str.pm
Expand Up @@ -15,8 +15,8 @@ augment class Any {
}
}

multi method subst(Regex $matcher, Str $replacement) {
self.split($matcher).join($replacement);
multi method subst(Regex $matcher, Str $replacement, :$g) {
self.split($matcher, :limit($g ?? * !! 2)).join($replacement);
}

multi method comb(Regex $matcher = /./, $limit = *, :$match) {
Expand Down

0 comments on commit fe1e749

Please sign in to comment.