Skip to content

Commit

Permalink
Fix adding object to BagHash after it having been removed
Browse files Browse the repository at this point in the history
This was a forgotten fix from the previous commit
  • Loading branch information
lizmat committed Mar 21, 2019
1 parent 6365798 commit c566430
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/BagHash.pm6
Expand Up @@ -142,7 +142,7 @@ my class BagHash does Baggy {
# processing.
nqp::stmts(
# save object for potential recreation
(my $object := nqp::atkey(elems,$key)),
(my $pair := nqp::atkey(elems,$key)),

Proxy.new(
FETCH => {
Expand Down Expand Up @@ -173,10 +173,11 @@ my class BagHash does Baggy {
),
nqp::if( # where did it go?
nqp::isgt_i($value,0),
nqp::bindkey(
elems,
$key,
Pair.new($object,nqp::decont($value))
nqp::bindattr(
nqp::bindkey(elems,$key,$pair),
Pair,
'$!value',
nqp::decont($value)
)
)
)
Expand Down

0 comments on commit c566430

Please sign in to comment.