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

There's nothing in $0 et al. after doing a regex match with infix:<!~~> in Rakudo #1994

Closed
p6rt opened this issue Aug 1, 2010 · 6 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 1, 2010

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

Searchable as RT76892$

@p6rt
Copy link
Author

p6rt commented Aug 1, 2010

From @masak

<masak> rakudo​: my $a = "fool!"; $a ~~ / (foo) /; say $0
<p6eval> rakudo 9b6189​: OUTPUT«foo␤»
<masak> rakudo​: my $a = "fool!"; $a !~~ / (foo) /; say $0
<p6eval> rakudo 9b6189​: OUTPUT«Any()␤»
* masak submits rakudobug
<masak> just because I want it not to match doesn't mean I don't want
it to capture. :)
<masak> oh well, easy/obvious workaround.
<masak> rakudo​: my $a = "fool!"; $a ~~ / (foo) { say "OH HAI" } /
<p6eval> rakudo 9b6189​: OUTPUT«OH HAI␤»
<masak> rakudo​: my $a = "fool!"; $a !~~ / (foo) { say "OH HAI" } /
<p6eval> rakudo 9b6189​: OUTPUT«OH HAI␤»
<masak> interesting. so the error seems to be in !~~
<masak> the lack of assigning to $/, that is.
<masak> rakudo​: my $a = "fool!"; $a ~~ / (foo) { say $0 } /
<p6eval> rakudo 9b6189​: OUTPUT«foo␤»
<masak> rakudo​: my $a = "fool!"; $a !~~ / (foo) { say $0 } /
<p6eval> rakudo 9b6189​: OUTPUT«foo␤»
<isBEKaml> masak​: Interesting...
<masak> interestinger and interestinger...

@p6rt
Copy link
Author

p6rt commented Nov 1, 2010

From @masak

masak (>)​:

<masak> rakudo​: my $a = "fool!"; $a ~~ / (foo) /; say $0
<p6eval> rakudo 9b6189​: OUTPUT«foo␤»
<masak> rakudo​: my $a = "fool!"; $a !~~ / (foo) /; say $0
<p6eval> rakudo 9b6189​: OUTPUT«Any()␤»
* masak submits rakudobug

<masak> rakudo​: my $a = "fool!"; $a ~~ / (foo) /; say $0
<p6eval> rakudo 5f5bae​: OUTPUT«foo␤»
<masak> rakudo​: my $a = "fool!"; $a !~~ / (foo) /; say $0
<p6eval> rakudo 5f5bae​: OUTPUT«foo␤»
<masak> ooh!
* masak resolves http://rt.perl.org/rt3/Ticket/Display.html?id=76892

So I guess this one awaits a test now.

@p6rt
Copy link
Author

p6rt commented Nov 1, 2010

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 1, 2010

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

@p6rt p6rt closed this as completed Nov 1, 2010
@p6rt
Copy link
Author

p6rt commented Nov 1, 2010

From @moritz

Test is in S05-capture/subrule.t.

@p6rt
Copy link
Author

p6rt commented Oct 7, 2011

From @moritz

sorry, that last comment was meant to go to a different ticket, please
ignore it.

@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