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

&take flattens arrays in Rakudo #2513

Closed
p6rt opened this issue Oct 13, 2011 · 5 comments
Closed

&take flattens arrays in Rakudo #2513

p6rt opened this issue Oct 13, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Oct 13, 2011

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

Searchable as RT101316$

@p6rt
Copy link
Author

p6rt commented Oct 13, 2011

From @masak

<masak> perl6​: say .perl for (gather for 1, 2, 3 -> $a { for <a b c>
-> $b { take [$a, $b] } })
<p6eval> b 1b7dd1, niecza v10-43-gf5298c8​: OUTPUT«[1, "a"]␤[1,
"b"]␤[1, "c"]␤[2, "a"]␤[2, "b"]␤[2, "c"]␤[3, "a"]␤[3, "b"]␤[3, "c"]␤»
<p6eval> ..nom 3e66bd​:
OUTPUT«1␤"a"␤1␤"b"␤1␤"c"␤2␤"a"␤2␤"b"␤2␤"c"␤3␤"a"␤3␤"b"␤3␤"c"␤»
* masak submits rakudobug
<moritz> what's wrong, the .perl?
<moritz> nom​: say <a b>.perl
<p6eval> nom 3e66bd​: OUTPUT«("a", "b")␤»
<moritz> oh, it flattens
<masak> nom​: say [<a b>].perl
<p6eval> nom 3e66bd​: OUTPUT«["a", "b"]␤»
<masak> no, the problem isn't .perl, it seems, but &take

@p6rt
Copy link
Author

p6rt commented Oct 13, 2011

From @moritz

A test can already be found in S04-statements/gather.t

@p6rt
Copy link
Author

p6rt commented Oct 13, 2011

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

@p6rt
Copy link
Author

p6rt commented Jan 13, 2012

From @jnthn

On Thu Oct 13 06​:25​:35 2011, masak wrote​:

<masak> perl6​: say .perl for (gather for 1, 2, 3 -> $a { for <a b c>
-> $b { take [$a, $b] } })
<p6eval> b 1b7dd1, niecza v10-43-gf5298c8​: OUTPUT«[1, "a"]␤[1,
"b"]␤[1, "c"]␤[2, "a"]␤[2, "b"]␤[2, "c"]␤[3, "a"]␤[3, "b"]␤[3, "c"]␤»
<p6eval> ..nom 3e66bd​:
OUTPUT«1␤"a"␤1␤"b"␤1␤"c"␤2␤"a"␤2␤"b"␤2␤"c"␤3␤"a"␤3␤"b"␤3␤"c"␤»
* masak submits rakudobug
<moritz> what's wrong, the .perl?
<moritz> nom​: say <a b>.perl
<p6eval> nom 3e66bd​: OUTPUT«("a", "b")␤»
<moritz> oh, it flattens
<masak> nom​: say [<a b>].perl
<p6eval> nom 3e66bd​: OUTPUT«["a", "b"]␤»
<masak> no, the problem isn't .perl, it seems, but &take

Fixed and tested; resolving ticket.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 13, 2012

@jnthn - 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