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

:i doesn't work with <$var>s #3069

Closed
p6rt opened this issue Mar 8, 2013 · 7 comments
Closed

:i doesn't work with <$var>s #3069

p6rt opened this issue Mar 8, 2013 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Mar 8, 2013

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

Searchable as RT117091$

@p6rt
Copy link
Author

p6rt commented Mar 8, 2013

From d.ginev@jacobs-university.de

<LlamaRider> r​: my $rex='rex'; say "Rex" ~~ m​:i/$rex/; say "Rex" ~~
m​:i/<$rex>/;
<p6eval> rakudo 11157e​: OUTPUT«「Rex」␤␤#<failed match>␤»

I think both should match Rex here.
Which works if we assign $rex as​:

<LlamaRider> r​: my $rex=rx​:i/rex/; say "Rex" ~~ m​:i/$rex/; say "Rex" ~~
m​:i/<$rex>/;
<p6eval> rakudo 11157e​: OUTPUT«「Rex」␤␤「Rex」␤␤»

@p6rt
Copy link
Author

p6rt commented Mar 11, 2013

From @pmichaud

According to S05​:220​:

  The C<​:i> (or C<​:ignorecase>) modifier causes case distinctions to be
  ignored in its lexical scope, but not in its dynamic scope. That is,
  subrules always use their own case settings.

Since <$rex> is a subrule (indirect subrule call), it has its own case
settings instead of using the ones from the dynamic scope.

Rejecting ticket.

Pm

@p6rt
Copy link
Author

p6rt commented Mar 11, 2013

@pmichaud - Status changed from 'new' to 'rejected'

@p6rt
Copy link
Author

p6rt commented Mar 11, 2013

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

@p6rt
Copy link
Author

p6rt commented Mar 11, 2013

From @pmichaud

Reopening ticket; S05​:1303 seems to indicate that strings being compiled
should honor the :ignorecase setting.

Sorry for the confusion,

Pm

@p6rt
Copy link
Author

p6rt commented Jul 20, 2014

From @FROGGS

perl6-m -e 'my $rex="rex"; say "Rex" ~~ m​:i/$rex/; say "Rex" ~~ m​:i/<$rex>/;'
「Rex」
「Rex」

Test​: Raku/roast@4da54d891f

@p6rt p6rt closed this as completed Jul 20, 2014
@p6rt
Copy link
Author

p6rt commented Jul 20, 2014

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

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