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

.=uniq on a hash element array in sink context wrongly leaves that array empty in Rakudo #3357

Closed
p6rt opened this issue Mar 13, 2014 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 13, 2014

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

Searchable as RT121434$

@p6rt
Copy link
Author

p6rt commented Mar 13, 2014

From @masak

<FROGGS> m​: my %a; %a<foo> = <a b c>; say %a<foo>.=uniq; say %a<foo>
<camelia> rakudo-moar 5b109d​: OUTPUT«a b c␤a b c␤»
<FROGGS> m​: my %a; %a<foo> = <a b c>; %a<foo>.=uniq; say %a<foo>
<camelia> rakudo-moar 5b109d​: OUTPUT«␤»
<FROGGS> masak​: please explain the above^^
<FROGGS> why is it empty when the mutator is called in sink context?
<FROGGS> p6​: my %a; %a<foo> = <a b c>; %a<foo>.=uniq; say %a<foo>
<camelia> niecza v24-109-g48a8de3​: OUTPUT«a b c␤»
<camelia> ..rakudo-parrot 5b109d, rakudo-jvm 5b109d, rakudo-moar
5b109d​: OUTPUT«␤»
<FROGGS> p6​: my %a; %a<foo> = <a b c>; %a<foo>.=sort; say %a<foo>
<camelia> rakudo-parrot 5b109d, rakudo-jvm 5b109d, rakudo-moar 5b109d,
niecza v24-109-g48a8de3​: OUTPUT«a b c␤»
<FROGGS> lizmat++ # a uniq bug!
<masak> looks like a bug to me too.
* masak submits rakudobug
<masak> r​: my @​a = <a b b b c c>; @​a.=uniq; say @​a
<camelia> rakudo-parrot 5b109d, rakudo-jvm 5b109d, rakudo-moar 5b109d​:
OUTPUT«a b c␤»
<masak> innerestin'

In the case above where Niecza's behavior differs from Rakudo's,
Niecza's behavior is what I would expect.

@p6rt
Copy link
Author

p6rt commented Mar 14, 2014

From @FROGGS

<FROGGS> p6​: my %a; %a<foo> = <a b c>; %a<foo>.=uniq; say %a<foo>
<camelia> rakudo-parrot 656089, rakudo-jvm 656089, rakudo-moar 656089, niecza v24-109-g48a8de3​: OUTPUT«a b c␤»
<FROGGS> \o/

Fixed in rakudo/rakudo@5226298
and rakudo/rakudo@3a30ddb

@p6rt
Copy link
Author

p6rt commented Mar 14, 2014

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

@p6rt
Copy link
Author

p6rt commented Apr 13, 2014

From @Mouq

On Fri Mar 14 01​:57​:24 2014, FROGGS.de wrote​:

<FROGGS> p6​: my %a; %a<foo> = <a b c>; %a<foo>.=uniq; say %a<foo>
<camelia> rakudo-parrot 656089, rakudo-jvm 656089, rakudo-moar 656089,
niecza v24-109-g48a8de3​: OUTPUT«a b c␤»
<FROGGS> \o/

Fixed in
rakudo/rakudo@5226298
and
rakudo/rakudo@3a30ddb

Tests added in S32-list/uniq.t and S32-list/squish.t . Closing

@p6rt
Copy link
Author

p6rt commented Apr 13, 2014

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