Skip to content

Commit

Permalink
Correct Str.comb.count-only/bool-only semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Sep 8, 2018
1 parent 9738dfb commit d1e80df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Str.pm6
Expand Up @@ -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)) }

Expand Down

0 comments on commit d1e80df

Please sign in to comment.