# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #117235] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117235 >
<masak> just found my heisenbug :) <masak> yeah, this is a weird one. <diakopter> run it? <masak> rn: my $c = [[1]].map({ [ @$_ ] }); $c.push( 42 ); say $c.perl <p6eval> rakudo 9be4cc, niecza v24-35-g5c06e28: OUTPUT«([1], 42).list.item» <masak> rn: my $c = [[1]].map({ [ @$_ ] }); $c.unshift( 42 ); say $c.perl <p6eval> rakudo 9be4cc: OUTPUT«(42,).list.item» <p6eval> ..niecza v24-35-g5c06e28: OUTPUT«(42, [1]).list.item» * masak submits rakudobug <masak> rn: my $c = [[1], [2], [3]].map({ [ @$_ ] }); $c.unshift( 42 ); say $c.perl <p6eval> niecza v24-35-g5c06e28: OUTPUT«(42, [1], [2], [3]).list.item» <p6eval> ..rakudo 9be4cc: OUTPUT«(42,).list.item» Niecza is right throughout, of course. The .unshift method adds elements; it doesn't remove them.