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

Array interpolation in regexes does not match with alternation semantics in Rakudo #2437

Closed
p6rt opened this issue Jul 24, 2011 · 4 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 24, 2011

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

Searchable as RT95504$

@p6rt
Copy link
Author

p6rt commented Jul 24, 2011

From @masak

<masak> rakudo​: $_ = "open"; my @​verbs = "open", "close"; say $_ ~~ /^ @​verbs/
<p6eval> rakudo 922500​: OUTPUT«␤»
<masak> rakudo​: $_ = "open"; my @​verbs = "open"; say $_ ~~ /^ @​verbs/
<p6eval> rakudo 922500​: OUTPUT«open␤»
<masak> ah, seems array interpolation isn't correctly implemented
after all. (the array stringifies instead of acting like any(@​verbs)).
that's too bad. [11​:38]
<moritz> rakudo​: $_ = "open"; my @​verbs = <open close>; say $_ ~~ /^ @​verbs/
<p6eval> rakudo 922500​: OUTPUT«␤»
<masak> maybe an appropriate change to src/Perl6/Actions.pm​:3109 would
fix things.
<masak> huh. that's odd.
<masak> looking at the commit for that area of code, the !MAKE_REGEX
routine in src/glue/regex.pir seems to be *specifically* made for
handling arrays interpolated into regexes.
<masak> but I don't see it applying any infix​:<|> semantics.
<masak> S05​:1139​: "An interpolated array [...] is matched as if it
were an alternation of its elements."
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Feb 19, 2013

From @FROGGS

Patch​:
rakudo/rakudo@8e6fa0b

Test​:
Raku/roast@e452149

@p6rt
Copy link
Author

p6rt commented Feb 19, 2013

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

@p6rt
Copy link
Author

p6rt commented Feb 19, 2013

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

@p6rt p6rt closed this as completed Feb 19, 2013
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant