summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/op/tie.t
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/t/op/tie.t')
-rwxr-xr-xcontrib/perl5/t/op/tie.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/perl5/t/op/tie.t b/contrib/perl5/t/op/tie.t
index 77e74db..472a6a7 100755
--- a/contrib/perl5/t/op/tie.t
+++ b/contrib/perl5/t/op/tie.t
@@ -153,3 +153,16 @@ $C = $B = tied %H ;
}
untie %H;
EXPECT
+########
+
+# verify no leak when underlying object is selfsame tied variable
+my ($a, $b);
+sub Self::TIEHASH { bless $_[1], $_[0] }
+sub Self::DESTROY { $b = $_[0] + 0; }
+{
+ my %b5;
+ $a = \%b5 + 0;
+ tie %b5, 'Self', \%b5;
+}
+die unless $a == $b;
+EXPECT
OpenPOWER on IntegriCloud