Skip to content

Commit

Permalink
Referring to a non-existing key returns a container
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 15, 2020
1 parent 1d95056 commit d93c105
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S32-hash/multislice-6e.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ for @three-single -> $a, $b, $c, $result {
set-up-hash;
for False, True -> $delete {
is-deeply %hash{$a;$b;$c}:$delete,
$exists ?? $result !! Any,
!$exists && !$delete ?? Any !! $result,
"\%hash\{$araku;$braku;$craku}{
":delete" if $delete
} gives {$exists ?? $raku !! "Nil"}";
Expand Down Expand Up @@ -118,7 +118,7 @@ for @three-whatever -> $a, $b, $c, $result {
set-up-hash;
for False, True -> $delete {
is-deeply %hash{$a;$b;$c}:$delete,
$exists ?? ($result,) !! (Nil,),
!$exists && !$delete ?? (Any,) !! ($result,),
"\%hash\{$araku;$braku;$craku}{
":delete" if $delete
} gives {
Expand Down

0 comments on commit d93c105

Please sign in to comment.