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

(Bag|Mix)Hash.values doesn't check validity of assigned values #6215

Closed
p6rt opened this issue May 1, 2017 · 7 comments
Closed

(Bag|Mix)Hash.values doesn't check validity of assigned values #6215

p6rt opened this issue May 1, 2017 · 7 comments

Comments

@p6rt
Copy link

p6rt commented May 1, 2017

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

Searchable as RT131241$

@p6rt
Copy link
Author

p6rt commented May 1, 2017

From @lizmat

<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = 0 for $b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b = ("b"=>0,"a"=>0,"c"=>0).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = -1 for $b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b = ("b"=>-1,"a"=>-1,"c"=>-1).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.MixHash; $_ = 0 for $b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «MixHash $b = ("b"=>0,"a"=>0,"c"=>0).MixHash␤»

All should empty out the BagHash/MixHash.

@p6rt
Copy link
Author

p6rt commented May 1, 2017

From @lizmat

Fixed for the .values case with c1bd844e2752799af8e and 0e0ac2fb8c51a82a0 . But this needs a more thorough fix. To be forthcoming soon!

On 1 May 2017, at 19​:28, Elizabeth Mattijsen (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Elizabeth Mattijsen
# Please include the string​: [perl #​131241]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131241 >

<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = 0 for $b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b = ("b"=>0,"a"=>0,"c"=>0).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = -1 for $b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b = ("b"=>-1,"a"=>-1,"c"=>-1).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.MixHash; $_ = 0 for $b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «MixHash $b = ("b"=>0,"a"=>0,"c"=>0).MixHash␤»

All should empty out the BagHash/MixHash.

@p6rt
Copy link
Author

p6rt commented May 20, 2017

@lizmat - Status changed from 'new' to 'resolved'

@p6rt
Copy link
Author

p6rt commented Jul 4, 2017

From @AlexDaniel

The fix for this ticket also fixed https://rt.perl.org/Public/Bug/Display.html?id=130366

However, we couldn't find any tests… are there any? If they, perhaps they also cover 130366.

On 2017-05-01 14​:31​:19, elizabeth wrote​:

Fixed for the .values case with c1bd844e2752799af8e and
0e0ac2fb8c51a82a0 . But this needs a more thorough fix. To be
forthcoming soon!

On 1 May 2017, at 19​:28, Elizabeth Mattijsen (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Elizabeth Mattijsen
# Please include the string​: [perl #​131241]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131241 >

<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = 0 for $b.values;
dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b =
("b"=>0,"a"=>0,"c"=>0).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = -1 for
$b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b = ("b"=>-
1,"a"=>-1,"c"=>-1).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.MixHash; $_ = 0 for $b.values;
dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «MixHash $b =
("b"=>0,"a"=>0,"c"=>0).MixHash␤»

All should empty out the BagHash/MixHash.

@p6rt
Copy link
Author

p6rt commented Jul 4, 2017

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

@p6rt
Copy link
Author

p6rt commented Jul 19, 2017

From @dogbert17

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

The fix for this ticket also fixed
https://rt.perl.org/Public/Bug/Display.html?id=130366

However, we couldn't find any tests… are there any? If they, perhaps
they also
cover 130366.

On 2017-05-01 14​:31​:19, elizabeth wrote​:

Fixed for the .values case with c1bd844e2752799af8e and
0e0ac2fb8c51a82a0 . But this needs a more thorough fix. To be
forthcoming soon!

On 1 May 2017, at 19​:28, Elizabeth Mattijsen (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Elizabeth Mattijsen
# Please include the string​: [perl #​131241]
# in the subject line of all future correspondence about this
issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131241 >

<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = 0 for $b.values;
dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b =
("b"=>0,"a"=>0,"c"=>0).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.BagHash; $_ = -1 for
$b.values; dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «BagHash $b = ("b"=>-
1,"a"=>-1,"c"=>-1).BagHash␤»
<lizmat> m​: my $b = <a b b c c c>.MixHash; $_ = 0 for $b.values;
dd $b
<camelia> rakudo-moar 1f80db​: OUTPUT​: «MixHash $b =
("b"=>0,"a"=>0,"c"=>0).MixHash␤»

All should empty out the BagHash/MixHash.

The tests for 130366 covers part of this RT, The rest can be found in Raku/roast@c2718dc.

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