Skip to content
Permalink
Browse files

Correct Str.comb.count-only/bool-only semantics

  • Loading branch information...
lizmat committed Sep 8, 2018
1 parent 9738dfb commit d1e80dfe285c03083cb3ad1c3d14f3d6e4d9310e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/Str.pm6
@@ -371,8 +371,8 @@ my class Str does Stringy { # declared in BOOTSTRAP
($!pos = $pos)
)
}
method count-only() { nqp::p6box_i($!chars) }
method bool-only(--> True) { }
method count-only(--> Int:D) { $!chars - $!pos - 1 }
method bool-only(--> Bool:D) { nqp::p6bool(self.count-only) }
}
multi method comb(Str:D:) { Seq.new(CombAll.new(self)) }

0 comments on commit d1e80df

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