Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updates to enable .hash to work on Match objects.
  • Loading branch information
pmichaud committed Apr 20, 2009
1 parent 07bfffc commit 480902e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/classes/Match.pir
Expand Up @@ -40,11 +40,11 @@ properly delegate to the underlying Capture PMC.
.return ($P1)
.end

.sub 'list' :method
$P0 = getattribute self, ['Capture'], 'proxy'
$P1 = $P0.'hash'()
.return ($P1)
.end
#.sub 'list' :method
# $P0 = getattribute self, ['Capture'], 'proxy'
# $P1 = $P0.'list'()
# .return ($P1)
#.end


=item of
Expand Down
2 changes: 1 addition & 1 deletion src/setting/Match.pm
Expand Up @@ -52,7 +52,7 @@ class Match is also {

multi method caps() {
my @caps = gather {
for @(self).pairs, %(self).pairs -> $p {
for self.list.pairs, self.hash.pairs -> $p {
# in regexes like [(.) ...]+, the capture for (.) is
# a List. flatten that.
if $p.value ~~ List {
Expand Down

0 comments on commit 480902e

Please sign in to comment.