Em Qui, 2009-10-01 às 12:22 -0400, Kevin Phair escreveu:
> This test fails for me with the latest Rakudo.  It looks like this is 
> because when a variable is pushed onto an array, and then 
> auto-incremented, it is also auto-incremented inside the array.
> my @stuff;
> my $w = 1;
> @stuff.push($w);
> @stuff.say;
> $w++;
> @stuff.say;
> gives an output of:
> 1
> 2

This is a rakudo bug, what's probably happening here is that rakudo is
just adding the push *...@args to the end of @stuff, while it was supposed
to get an iterator for it and consume it while copying the values into
@stuff, which is basically the difference between assign and bind.

daniel

Reply via email to