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

List of matches stringifies to its number of elements, not to the matched text in Rakudo #932

Closed
p6rt opened this issue Apr 21, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 21, 2009

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

Searchable as RT64946$

@p6rt
Copy link
Author

p6rt commented Apr 21, 2009

From @masak

<masak> rakudo​: regex o { o }; "foo" ~~ /f<o>+/; say $&lt;o&gt;.WHAT; say ~$&lt;o>
<p6eval> rakudo ad7389​: OUTPUT«List␤2␤»
* masak was expecting 'oo' there
* moritz_ too
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Aug 12, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S05-match/capturing-contexts.t

commit 42de757ca2efdca487f23e54959612d7011f4d8c
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Wed Aug 12 03​:51​:10 2009 +0000

  [t/spec] Test for RT #​64946
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;27965 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S05-match/capturing-contexts.t b/t/spec/S05-match/capturing-contexts.t
index 122651f..112ffb5 100644
--- a/t/spec/S05-match/capturing-contexts.t
+++ b/t/spec/S05-match/capturing-contexts.t
@@ -2,7 +2,7 @@ use v6;
 
 use Test;
 
-plan 13;
+plan 16;
 
 if !eval('("a" ~~ /a/)') {
   skip_rest "skipped tests - rules support appears to be missing";
@@ -49,4 +49,18 @@ if !eval('("a" ~~ /a/)') {
   is $x.keys, 'a', 'match copy should be same as match';
 }
 
+# RT #64946
+{
+    regex o { o };
+    "foo" ~~ /f<o>+/;
+
+    #?rakudo todo 'RT #64946'
+    is ~$<o>, 'o o', 'match list stringifies like a normal list';
+    isa_ok $<o>, List;
+    # I don't know what difference 'isa' makes, but it does.
+    # Note that calling .WHAT (as in the original ticket) does not have
+    # the same effect.
+    is ~$<o>, 'o o', 'match list stringifies like a normal list AFTER "isa"';
+}
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Aug 12, 2009

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

@p6rt
Copy link
Author

p6rt commented Aug 28, 2009

From @pmichaud

This is now fixed as of 7666e92.

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Aug 28, 2009

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

@p6rt p6rt closed this as completed Aug 28, 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