require 'test.pl';
-plan (111);
+plan (117);
#
# @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
$bar[2] = '2';
$r = join(',', $#bar, @bar);
is($r, "2,0,,2");
-reset 'b';
+reset 'b' if $^O ne 'VMS';
@bar = ();
$bar[0] = '0';
$r = join(',', $#bar, @bar);
}
}
+{
+ # Bug #37350
+ my @array = (1..4);
+ $#{@array} = 7;
+ is ($#{4}, 7);
+
+ my $x;
+ $#{$x} = 3;
+ is(scalar @$x, 4);
+
+ push @{@array}, 23;
+ is ($4[8], 23);
+}
+{
+ # Bug #37350 -- once more with a global
+ use vars '@array';
+ @array = (1..4);
+ $#{@array} = 7;
+ is ($#{4}, 7);
+
+ my $x;
+ $#{$x} = 3;
+ is(scalar @$x, 4);
+
+ push @{@array}, 23;
+ is ($4[8], 23);
+}
+
"We're included by lib/Tie/Array/std.t so we need to return something true";