I've had commit access to the Pugs project for a long time but haven't done much with it. I fixed some stuff in CGI, wrote the first translation of HTML::Entities and started the examples/cookbook project (largely untouched), but that was about it. Today, in trying to solve 99 Perl 6 problems, I ran into a bug.
my @array = ; @array.splice(3, 5).perl.say;
That prints 'h', instead of of the list. I hopped onto the #perl6 IRC channel and asked about this and Luke found the problem in src/Pugs/Primhs:
-- op4 "splice" = \x y z w-> do op4 "splice" = \x y z w -> do splice <- doArray x array_splice start <- fromVal y count <- fromVal z vals <- fromVals w vals' <- splice start count vals ifListContext (return $ VList vals') (return $ last (undef:vals'))
The ifListContext says that if we're in list context, return the list, otherwise, return the last value from it. He changed that to this:
-- op4 "splice" = \x y z w-> do op4 "splice" = \x y z w -> do splice <- doArray x array_splice start <- fromVal y count <- fromVal z vals <- fromVals w vals' <- splice start count vals return $ VList vals'
I then committed a test to verify that this works. I really want to learn Haskell so I can do this myself, but for now, I'll keep working on my 99 problems.