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

LAST does not work with -n in Rakudo #5374

Open
p6rt opened this issue Jun 13, 2016 · 4 comments
Open

LAST does not work with -n in Rakudo #5374

p6rt opened this issue Jun 13, 2016 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 13, 2016

Migrated from rt.perl.org#128398 (status was 'open')

Searchable as RT128398$

@p6rt
Copy link
Author

p6rt commented Jun 13, 2016

From @masak

$ perl6 --version
This is Rakudo version 2016.05-115-g8430f07 built on MoarVM version
2016.05-17-g6075599
implementing Perl 6.c.

$ perl6 -e 'for 1, 2, 3 { last if /2/; say $_; LAST { say "hi" } }'
1
hi

$ cat > numbers
1
2
3

$ <numbers perl6 -ne 'last if /2/; say $_; LAST { say "hi" }'
1

Both loops correctly `last` before printing "2\n". But the -n loop
doesn't run the `LAST` phaser, for some reason. I expected it to.

@p6rt
Copy link
Author

p6rt commented Jul 14, 2016

From @zoffixznet

♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁

TODO-Fudged tests added in Raku/roast@ca52ecc150

🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥

@p6rt
Copy link
Author

p6rt commented Jul 14, 2016

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

@p6rt
Copy link
Author

p6rt commented Aug 26, 2016

From @masak

<killbill> Why I don't see last line? $ perl6 -ne 'LAST .say' file.txt
<masak> killbill​: because bug, I'd say
* masak submits killbill's LAST bug

I could reproduce locally that `perl6 -ne 'LAST .say'` does not print
the last line. This is true for both the block and statement form of
LAST. It prints the last line if instead of -ne I do a `for ^3 { ...
}` loop.

$ perl6 -v
This is Rakudo version 2016.07.1-188-g8f43bb8 built on MoarVM version
2016.07-17-g40948f6
implementing Perl 6.c.

@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