Skip to content

Commit 6fb90f2

Browse files
committed
Array.unshift with false elements
1 parent 86de197 commit 6fb90f2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

S32-array/unshift.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Unshift tests
99
1010
=end description
1111

12-
plan 55;
12+
plan 56;
1313

1414
# basic unshift tests
1515

@@ -157,4 +157,10 @@ plan 55;
157157
is $x, 1, '$x isn\'t affected by changes to new element created by unshift(@a, $x)';
158158
}
159159

160+
{
161+
my @a = <b c>;
162+
@a.unshift(0);
163+
is @a.join(','), '0,b,c', 'can unshift an element that boolifies to False';
164+
}
165+
160166
# vim: ft=perl6

0 commit comments

Comments
 (0)