diff options
author | David Mitchell <davem@iabyn.com> | 2015-12-17 12:13:09 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 09:18:34 +0000 |
commit | 75bc488d4e88019e591cb7483510cbd02ac47320 (patch) | |
tree | fc6aad4b7475ac855c032df98ad58dfbaa0fcf90 /t/op/do.t | |
parent | e02ce34b5a3c7daaf3131c6aea9a98f7dbbba1b5 (diff) | |
download | perl-75bc488d4e88019e591cb7483510cbd02ac47320.tar.gz |
replace leave_common() with leave_adjust_stacks()
Make the remaining callers of S_leave_common() use leave_adjust_stacks()
instead, then delete this static function.
This brings the benefits of freeing TEMPS on all scope exists that
has already been introduced on sub exits; uses the optimised code for
creating mortal copies; and finally unifies all the different 'process
return args on scope exit' implementations into single function.
Diffstat (limited to 't/op/do.t')
-rw-r--r-- | t/op/do.t | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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(); |