Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #110 from gerdr/patch-1

Add Bool method to Capture
  • Loading branch information...
commit e1f5d99f614f45bed89763bdf545efac675f90fd 2 parents 3529536 + 9f873d8
@moritz moritz authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/Capture.pm
View
4 src/core/Capture.pm
@@ -69,6 +69,10 @@ my class Capture {
nqp::p6box_s(nqp::join(' ', $str))
}
+ multi method Bool(Capture:D:) {
+ $!list || $!hash ?? True !! False
+ }
+
method Capture(Capture:D:) {
self
}
Please sign in to comment.
Something went wrong with that request. Please try again.