Skip Menu |
Report information
Id: 131241
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: elizabeth <liz [at] dijkmat.nl>
Cc:
AdminCc:

Severity: (no value)
Tag: testneeded
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Mon, 1 May 2017 19:26:59 +0200
To: rakudobug [...] perl.org
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Subject: (Bag|Mix)Hash.values doesn't check validity of assigned values
Download (untitled) / with headers
text/plain 526b
<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.
Date: Mon, 1 May 2017 23:30:48 +0200
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: "Elizabeth Mattijsen (via RT)" <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #131241] (Bag|Mix)Hash.values doesn't check validity of assigned values
Download (untitled) / with headers
text/plain 1014b
Fixed for the .values case with c1bd844e2752799af8e and 0e0ac2fb8c51a82a0 . But this needs a more thorough fix. To be forthcoming soon! Show quoted text
> 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.perl.org/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 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:
Show quoted text
> 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.perl.org/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.


Download (untitled) / with headers
text/plain 1.5k
On Tue, 04 Jul 2017 14:52:31 -0700, alex.jakimenko@gmail.com wrote: Show quoted text
> 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.perl.org/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 https://github.com/perl6/roast/commit/c2718dc4ece330bc3dd303089f4efd1d3d7f2b9d. Closing issue.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org