Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named captures are Str's, not Matches #740

Closed
p6rt opened this issue Mar 3, 2009 · 8 comments
Closed

Named captures are Str's, not Matches #740

p6rt opened this issue Mar 3, 2009 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Mar 3, 2009

Migrated from rt.perl.org#63616 (status was 'resolved')

Searchable as RT63616$

@p6rt
Copy link
Author

p6rt commented Mar 3, 2009

From @moritz

09​:26 <@​moritz_> rakudo​: rule w { . }; 'a' ~~ m/<w>/; for %($/).kv ->
$k, $v {say $v.WHAT };
09​:26 < p6eval> rakudo 4ec17d​: OUTPUT«Str␤»

I think the output should be 'Match', not 'Str'.

Cheers,
Moritz

--
Moritz Lenz
http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

@p6rt
Copy link
Author

p6rt commented Mar 23, 2009

From @moritz

Moritz Lenz (via RT) wrote​:

09​:26 <@​moritz_> rakudo​: rule w { . }; 'a' ~~ m/<w>/; for %($/).kv ->
$k, $v {say $v.WHAT };
09​:26 < p6eval> rakudo 4ec17d​: OUTPUT«Str␤»

I think the output should be 'Match', not 'Str'.

not only .kv turn a Match into Str, also .pairs​:

09​:06 < moritz_> rakudo​: class Match is also { method t { say
%(self).pairs.[0].value.WHAT; } }; "a" ~~ /<xdigit>/; $/.t; say
$<xdigit>.WHAT
09​:06 < p6eval> rakudo 1c263b​: OUTPUT«Str␤Match␤»

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Mar 23, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Apr 20, 2009

From @moritz

giving to pmichaud

@p6rt
Copy link
Author

p6rt commented Apr 21, 2009

From @pmichaud

Now fixed in 6ea0aa1. If we have confirmation of tests then this ticket
can be closed.

Thanks!

Pm

1 similar comment
@p6rt
Copy link
Author

p6rt commented Apr 21, 2009

From @pmichaud

Now fixed in 6ea0aa1. If we have confirmation of tests then this ticket
can be closed.

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Apr 21, 2009

From @moritz

On Tue Apr 21 12​:23​:33 2009, pmichaud wrote​:

Now fixed in 6ea0aa1. If we have confirmation of tests then this ticket
can be closed.

It's used extensively in Match.caps and Match.chunks (which I now fixed
in a76abb3) which in turn is tested in S05-capture/caps.t.

So, "yes".

Moritz

@p6rt
Copy link
Author

p6rt commented Apr 21, 2009

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Apr 21, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant