Skip Menu |
Report information
Id: 128398
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Mon, 13 Jun 2016 18:36:01 +0200
Subject: [BUG] LAST does not work with -n in Rakudo
From: Carl Mäsak <cmasak [...] gmail.com>
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 425b
$ 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.
Download (untitled) / with headers
text/plain 785b
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ 🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁 TODO-Fudged tests added in https://github.com/perl6/roast/commit/ca52ecc150 🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁 ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
Date: Fri, 26 Aug 2016 10:03:22 +0200
From: Carl Mäsak <cmasak [...] gmail.com>
Subject: [BUG] LAST does not trigger in -ne loop in Rakudo
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 492b
<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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org