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

.grep does not fire FIRST / LAST / NEXT phasers #6164

Open
p6rt opened this issue Mar 25, 2017 · 2 comments
Open

.grep does not fire FIRST / LAST / NEXT phasers #6164

p6rt opened this issue Mar 25, 2017 · 2 comments

Comments

@p6rt
Copy link

p6rt commented Mar 25, 2017

Migrated from rt.perl.org#131060 (status was 'new')

Searchable as RT131060$

@p6rt
Copy link
Author

p6rt commented Mar 25, 2017

From @lizmat

$ 6 'dd <a b c>.grep​: { FIRST say "first"; LAST say "last"; NEXT say "next"; ENTER say "enter"; LEAVE say "leave"; 1 }'
enter
leave
enter
leave
enter
leave
("a", "b", "c").Seq

This may have been a problem for a *long* time!

This should probably be fixed during the hyper / race refactor, which will need to take a look at using grep asynchronously anyway.

@p6rt
Copy link
Author

p6rt commented Mar 25, 2017

From @zoffixznet

Note that currently there're two paths that can be taken that's affected by arity of the grep's block. So the tests should also test with blocks of arity 2+, like​:

<Zoffix_> m​: dd <a b c d>.grep​: -> $, $ { FIRST say "first"; LAST say "last"; NEXT say "next"; ENTER say "enter"; LEAVE say "leave"; 1 }
<camelia> rakudo-moar b01d7e​: OUTPUT​: «enter␤leave␤enter␤leave␤(("a", "b"), ("c", "d")).Seq␤»

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