check { cast $a, $wiz } { }, 'cast';
-my $b = check { $a } { get => 1 }, 'assign to';
+my $b;
+# $b has to be set inside the block for the test to pass on 5.8.3 and lower
+check { $b = $a } { get => 1 }, 'assign to';
is $b, $n, 'get: assign to correctly';
$b = check { "X${a}Y" } { get => 1 }, 'interpolate';
check { cast $a, $wiz } { }, 'cast';
-my $b = check { $a } { get => 1 }, 'assign to';
+my $b;
+# $b has to be set inside the block for the test to pass on 5.8.3 and lower
+check { $b = $a } { get => 1 }, 'assign to';
is $b, $n, 'scalar: assign to correctly';
$b = check { "X${a}Y" } { get => 1 }, 'interpolate';
$b = check { exists $a[1] } { }, 'array element: exists';
is $b, 1, 'scalar: array element: exists correctly';
-$b = check { delete $a[1] } { get => 1, free => ($] > 5.008005 ? 1 : 0) }, 'array element: delete';
+# $b has to be set inside the block for the test to pass on 5.8.3 and lower
+check { $b = delete $a[1] } { get => 1, free => ($] > 5.008005 ? 1 : 0) }, 'array element: delete';
is $b, 6, 'scalar: array element: delete correctly';
check { $a[1] = 4 } { }, 'array element: set after delete';
$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'; () }