In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/d77401488a85b2a1918a46d5ac1bcc94e6ae1a20?hp=c7a9a2576639091bf1e3c8d8e712b5480d67d442>
- Log ----------------------------------------------------------------- commit d77401488a85b2a1918a46d5ac1bcc94e6ae1a20 Author: Zefram <zef...@fysh.org> Date: Tue Jan 16 18:45:40 2018 +0000 additional test for lazy array element creation ----------------------------------------------------------------------- Summary of changes: t/op/array.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/op/array.t b/t/op/array.t index 4d16272459..3d9b9d7900 100644 --- a/t/op/array.t +++ b/t/op/array.t @@ -6,7 +6,7 @@ BEGIN { set_up_inc('.', '../lib'); } -plan (178); +plan (179); # # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them @@ -589,6 +589,10 @@ $#a = -1; $#a++; my @qr = \(@q); is $qr[$_], \$q[$_], "lazy element creation with refgen" foreach 0..2; isnt $qr[1], \undef, "lazy element creation with refgen"; + my @r; + $r[1] = 1; + foreach my $re ((), @r) { $re = 5; } + is join("", @r), "55", "lazy element creation with foreach"; } "We're included by lib/Tie/Array/std.t so we need to return something true"; -- Perl5 Master Repository