Skip to content
Permalink
Browse files

Call !match-list directly in split

Rather than going through .match with all of its related checks along
the way.
  • Loading branch information...
jnthn committed Jun 10, 2019
1 parent ce30ff2 commit bed0695df251587f565bf6278a6ff01503341f74
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/Str.pm6
@@ -1479,7 +1479,8 @@ my class Str does Stringy { # declared in BOOTSTRAP
return Seq.new(Rakudo::Iterator.Empty) if $limit <= 0;

my \matches = $limit == Inf
?? self.match($pat, :g)
?? self!match-list($/, $pat($cursor-init(Match,self,:0c)),
CURSOR-GLOBAL, POST-MATCH)
!! self.match($pat, :x(1..$limit-1));

my str $str = nqp::unbox_s(self);

0 comments on commit bed0695

Please sign in to comment.
You can’t perform that action at this time.