Skip to content

Commit

Permalink
Add words method to Allomorph (#5107)
Browse files Browse the repository at this point in the history
This fixes the presumption that .words is like .comb(/ \S+ /).
  • Loading branch information
2colours committed Nov 23, 2022
1 parent 17062c3 commit 59a3485
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core.c/allomorphs.pm6
Expand Up @@ -12,6 +12,10 @@ my class Allomorph is Str {
method succ(Allomorph:D:) { self.Numeric.succ }
method pred(Allomorph:D:) { self.Numeric.pred }

method words(Allomorph:D: |c) {
nqp::getattr_s(self,Str,'$!value').words(|c)
}

method comb(Allomorph:D: |c) {
nqp::getattr_s(self,Str,'$!value').comb(|c)
}
Expand Down

0 comments on commit 59a3485

Please sign in to comment.