Permalink
Browse files

Merge pull request #110 from gerdr/patch-1

Add Bool method to Capture
  • Loading branch information...
2 parents 3529536 + 9f873d8 commit e1f5d99f614f45bed89763bdf545efac675f90fd @moritz moritz committed Apr 15, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/Capture.pm
View
@@ -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
}

0 comments on commit e1f5d99

Please sign in to comment.