From e4c5ccf3177be837114b952c25e52a6812f35eb5 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Fri, 14 Oct 2005 01:54:00 +0000 Subject: Re: [PATCH] Re: [perl #37350] $#{@$aref} in debugger gives: Bizarre copy of ARRAY in leave Message-ID: <20051013235457.GA23386@rpc142.cs.man.ac.uk> p4raw-id: //depot/perl@25808 --- t/op/array.t | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 't/op/array.t') diff --git a/t/op/array.t b/t/op/array.t index 6461a433bc..27565de702 100755 --- a/t/op/array.t +++ b/t/op/array.t @@ -7,7 +7,7 @@ BEGIN { require 'test.pl'; -plan (111); +plan (117); # # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them @@ -356,4 +356,32 @@ sub test_arylen { } } +{ + # 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"; -- cgit v1.2.1