summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2006-04-27 23:15:02 +0000
committerDave Mitchell <davem@fdisolutions.com>2006-04-27 23:15:02 +0000
commit658aef798ab992aed2b708fed0d12323ab3b1fcb (patch)
treec0e2521ed62e971248177a82a6c9beca14531400 /t
parent3a465856879d8f5c62068f777bdbd4b60c7e7eb4 (diff)
downloadperl-658aef798ab992aed2b708fed0d12323ab3b1fcb.tar.gz
[perl #39012] another REIFY bug
p4raw-id: //depot/perl@27986
Diffstat (limited to 't')
-rwxr-xr-xt/op/local.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/local.t b/t/op/local.t
index ca44607730..1e5ba854b0 100755
--- a/t/op/local.t
+++ b/t/op/local.t
@@ -4,7 +4,7 @@ BEGIN {
chdir 't' if -d 't';
require './test.pl';
}
-plan tests => 113;
+plan tests => 114;
my $list_assignment_supported = 1;
@@ -415,3 +415,15 @@ sub f { ok(0 == $[); }
is($h{"\243"}, "pound");
is($h{"\302\240"}, "octects");
}
+
+# [perl #39012] localizing @_ element then shifting frees element too # soon
+
+{
+ my $x;
+ my $y = bless [], 'X39012';
+ sub X39012::DESTROY { $x++ }
+ sub { local $_[0]; shift }->($y);
+ ok(!$x, '[perl #39012]');
+
+}
+