Skip to content

Commit

Permalink
univals() should be handled by Str.univals
Browse files Browse the repository at this point in the history
- so add that
- refer all others to Str.univals
  • Loading branch information
lizmat committed Jan 5, 2019
1 parent 485dec4 commit 64c88f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Cool.pm6
Expand Up @@ -104,7 +104,7 @@ my class Cool { # declared in BOOTSTRAP
method uniname() { uniname(self) }
method uninames() { uninames(self) }
method unival(Cool:D:) { self.Int.unival }
method univals() { univals(self) }
method univals(Cool:D:) { self.Str.univals }
method uniprop(|c) { uniprop(self, |c) }
method uniprop-int(|c) { uniprop-int(self, |c) }
method uniprop-bool(|c) { uniprop-bool(self, |c) }
Expand Down Expand Up @@ -405,7 +405,7 @@ multi sub unival(Str:D $str) { $str ?? $str.ord.unival !! Nil }
multi sub unival(Int:D $code) { $code.unival }

proto sub univals($, *%) {*}
multi sub univals(Str:D $str) { $str.ords.map: { .unival } }
multi sub univals(Str:D $str) { $str.univals }
#?endif

#?if moar
Expand Down
1 change: 1 addition & 0 deletions src/core/Str.pm6
Expand Up @@ -2302,6 +2302,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
#?endif

method unival(Str:D:) { self ?? self.ord.unival !! Nil }
method univals(Str:D:) { self.ords.map: *.unival }

method wordcase(Str:D: :&filter = &tclc, Mu :$where = True --> Str:D) {
self.subst(:g, / [<:L> \w* ] +% <['\-]> /, -> $m { # ' highlighting
Expand Down

0 comments on commit 64c88f9

Please sign in to comment.