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

BagHash/MixHash values don't check for zeroness #5892

Closed
p6rt opened this issue Dec 17, 2016 · 5 comments
Closed

BagHash/MixHash values don't check for zeroness #5892

p6rt opened this issue Dec 17, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 17, 2016

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

Searchable as RT130366$

@p6rt
Copy link
Author

p6rt commented Dec 17, 2016

From @lizmat

$ 6 'my $b = <a b b c d e f>.BagHash; $_-- for $b.values; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>1,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

$ 6 'my $b = <a b b c d e f>.BagHash; .value-- for $b.pairs; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>1,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

$ 6 'my $b = <a b b c d e f>.BagHash; $_ = 0 for $b.values; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>0,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

Same for MixHash. Baggy/Mixy need to have the equivalent logic to ISINSET from SetHash.

RTing this so it won’t fall through the cracks.

@p6rt
Copy link
Author

p6rt commented Jul 4, 2017

From @AlexDaniel

This was resolved together with https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131241

Tests needed, maybe. See other ticket for info on this.
On 2016-12-17 01​:42​:04, elizabeth wrote​:

$ 6 'my $b = <a b b c d e f>.BagHash; $_-- for $b.values; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>1,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

$ 6 'my $b = <a b b c d e f>.BagHash; .value-- for $b.pairs; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>1,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

$ 6 'my $b = <a b b c d e f>.BagHash; $_ = 0 for $b.values; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>0,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

Same for MixHash. Baggy/Mixy need to have the equivalent logic to
ISINSET from SetHash.

RTing this so it won’t fall through the cracks.

@p6rt
Copy link
Author

p6rt commented Jul 4, 2017

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

@p6rt
Copy link
Author

p6rt commented Jul 19, 2017

From @dogbert17

On Tue, 04 Jul 2017 14​:53​:26 -0700, alex.jakimenko@​gmail.com wrote​:

This was resolved together with
https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131241

Tests needed, maybe. See other ticket for info on this.
On 2016-12-17 01​:42​:04, elizabeth wrote​:

$ 6 'my $b = <a b b c d e f>.BagHash; $_-- for $b.values; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>1,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

$ 6 'my $b = <a b b c d e f>.BagHash; .value-- for $b.pairs; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>1,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

$ 6 'my $b = <a b b c d e f>.BagHash; $_ = 0 for $b.values; dd $b'
BagHash $b = ("a"=>0,"c"=>0,"b"=>0,"e"=>0,"f"=>0,"d"=>0).BagHash
*SHOULD* be BagHash $b = ("b"=>1).BagHash

Same for MixHash. Baggy/Mixy need to have the equivalent logic to
ISINSET from SetHash.

RTing this so it won’t fall through the cracks.

Tests added in Raku/roast@75ee890. Closing issue.

@p6rt
Copy link
Author

p6rt commented Jul 19, 2017

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

@p6rt p6rt closed this as completed Jul 19, 2017
@p6rt p6rt added the testneeded label Jan 5, 2020
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