]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/31-array.t
Test L:{last L} in t/18-opinfo.t
[perl/modules/Variable-Magic.git] / t / 31-array.t
index b98deccb83ebf7d36c0f1d23ec92fc632f7a7492..432fc5d887ad161c01373e1f117854b4027038fc 100644 (file)
@@ -48,7 +48,8 @@ is $b, 'd', 'array: delete correctly';
 $b = check { @a } { len => 1 }, 'length @';
 is $b, 3, 'array: length @ correctly';
 
-$b = check { $#a } { len => 1 }, 'length $#';
+# $b has to be set inside the block for the test to pass on 5.8.3 and lower
+check { $b = $#a } { len => 1 }, 'length $#';
 is $b, 2, 'array: length $# correctly';
 
 check { push @a, 'x'; () }