Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #90158, ||= on an array
  • Loading branch information
moritz committed Apr 22, 2012
1 parent 07e31a8 commit 2ffae45
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions S03-operators/short-circuit.t
Expand Up @@ -12,9 +12,7 @@ it is closely related to || and && and //.
=end description

# test cases by Andrew Savige

plan 79;
plan 80;

my $accum = '';
sub f1($s) { $accum ~= $s; 1 }
Expand Down Expand Up @@ -305,6 +303,13 @@ ok (0 || 0 || 1), '0 || 0 || 1 is true';

}

# RT #90158
{
my @a = 1;
@a ||= ();
is ~@a, '1', '||= works with array on the LHS';
}

done;

# vim: ft=perl6

0 comments on commit 2ffae45

Please sign in to comment.