This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
replace leave_common() with leave_adjust_stacks()
[perl5.git] / t / op / do.t
index 3cc4eae..0bbab5e 100644 (file)
--- a/t/op/do.t
+++ b/t/op/do.t
@@ -293,4 +293,16 @@ SKIP: {
     }->(do { 1; delete $foo{bar} });
 }
 
+# A do block should FREETMPS on exit
+# RT #124248
+
+{
+    package p124248;
+    my $d = 0;
+    sub DESTROY { $d++ }
+    sub f { ::is($d, 1, "RT 124248"); }
+    f(do { 1; !!(my $x = bless []); });
+}
+
+
 done_testing();