On Tue, 10 Oct 2017 05:56:34 -0700, c...@zoffix.com wrote: > If you convert an Array with holes into a List, it makes sense for > holes to be turned in Nils, > and if you individually AT-POS them, Nil is indeed what you get. > However, if you .perl or .gist that List, > or assign it to another Array with some `is default`, the Nils turn up > to be Mus: > > m: my @a = <a b c>; @a[1]:delete; @a[5] = 42; @a.List.gist.put; > @a.List.perl.put; my @b is default(42) = @a.List; say @b.perl > rakudo-moar b8eda6: OUTPUT: «(a (Mu) c (Mu) (Mu) 42)("a", Mu, "c", > Mu, Mu, 42)["a", Mu, "c", Mu, Mu, 42]» > > Which is especially weird, if you assign some Mus into the Array: > > m: (my @a)[1] = Mu; @a.List.gist.say > rakudo-moar b8eda6: OUTPUT: «((Mu) (Mu))» > m: (my @a)[1] = Mu; @a.List[0,1].say > rakudo-moar b8eda6: OUTPUT: «(Nil (Mu))» > > Looks like the logic that turns holes into Nils on AT-POS also needs > to be added in the iterator.
Made Array.List shove Nils into holes. Fix: https://github.com/rakudo/rakudo/commit/e135121914 Test: https://github.com/perl6/roast/commit/2257ab353f