Skip to content

Commit

Permalink
Make .match faster by simplifying proto
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 28, 2021
1 parent 0dae67a commit 2204c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.c/Str.pm6
Expand Up @@ -1554,7 +1554,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
))
}

proto method match(|) { $/ := nqp::getlexcaller('$/'); {*} }
proto method match(|) {*}
multi method match(Cool:D $pattern, |c) {
$/ := nqp::getlexcaller('$/');
self.match(/ "$pattern": /,|c)
Expand Down

0 comments on commit 2204c7c

Please sign in to comment.