# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #77586]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77586 >
<masak> rakudo: my %h = 1 => "foo", 2 => "bar", 3 => "foo"; %h = grep
{ .value ne "bar" }, %h.pairs; say %h.perl
<p6eval> rakudo f8e959: OUTPUT«{}»
<masak> anyone but me thinks that the result should contain two pairs?
<patrickas> rakudo: my %h = 1 => "foo", 2 => "bar", 3 => "foo"; my %n
= grep { .value ne "bar" }, %h.pairs; say %n.perl
<p6eval> rakudo f8e959: OUTPUT«{"1" => "foo", "3" => "foo"}»
* masak submits rakudobug
<masak> patrickas++ # workaround
<masak> rakudo: my %h = 1 => "foo"; %h = %h; say %h.perl
<p6eval> rakudo f8e959: OUTPUT«{}»
<masak> rakudo: my %h = 1 => "foo"; my %n = %h; say %n.perl
<p6eval> rakudo f8e959: OUTPUT«{"1" => "foo"}»
<patrickas> duh!
<masak> doubleplusungood.
<patrickas> rakudo: my %h = 1 => "foo"; %h = %h.clone; say %h.perl;
<p6eval> rakudo f8e959: OUTPUT«{"1" => "foo"}»
<patrickas> might be slightly nicer than creating a named temporary
variable as a workaround
<masak> indeed.