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

Statement-ending 'for' returns an empty list when nothing in the body was executed, block-form 'for' doesn't in Rakudo #2347

Closed
p6rt opened this issue Feb 4, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Feb 4, 2011

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

Searchable as RT83420$

@p6rt
Copy link
Author

p6rt commented Feb 4, 2011

From @masak

<masak> rakudo​: (say "OH HAI" if $_ > 4 for 1, 2, 3) or say "empty!"
<p6eval> rakudo 924242​: OUTPUT«empty!␤»
<masak> rakudo​: (for 1, 2, 3 { if $_ > 4 { say "OH HAI" } }) or say "empty!"
<p6eval> rakudo 924242​: ( no output ) [00​:24]
* masak submits rakudobug
<masak> rakudo​: say (for 1, 2, 3 { if $_ > 4 { say "OH HAI" } }).perl
<p6eval> rakudo 924242​: OUTPUT«(Bool​::False, Bool​::False, Bool​::False)␤»
<masak> rakudo​: say (say "OH HAI" if $_ > 4 for 1, 2, 3).perl
<p6eval> rakudo 924242​: OUTPUT«()␤»

@p6rt
Copy link
Author

p6rt commented Feb 6, 2011

From @pmichaud

Now fixed in 9898837. Needs tests.

Pm

@p6rt
Copy link
Author

p6rt commented Feb 6, 2011

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

@p6rt
Copy link
Author

p6rt commented Feb 12, 2011

From @moritz

I've unfudged a test in S04-statements/do.t for that.

@p6rt
Copy link
Author

p6rt commented Feb 12, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant