Skip to content

Commit

Permalink
[t/spec] Correct mistake in array unpacking test, and make it work wi…
Browse files Browse the repository at this point in the history
…thout reduction operator.

git-svn-id: http://svn.pugscode.org/pugs@29753 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
jnthn committed Feb 16, 2010
1 parent bb5e45b commit b1a7ce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S06-signature/unpack-array.t
Expand Up @@ -9,10 +9,10 @@ sub foo($x, [$y, *@z]) {
}

my @a = 2, 3, 4, 5;
is foo(1, @a), '2|3|4;5', 'array unpacking';
is foo(1, @a), '1|2|3;4;5', 'array unpacking';

sub bar([$x, $y, $z]) {
return [*] $x, $y, $z;
return $x * $y * $z;
}

ok bar(@a[0..2]) == 24, 'fixed length array unpacking';
Expand Down

0 comments on commit b1a7ce4

Please sign in to comment.