diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-22 12:06:45 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-22 17:10:43 -0700 |
commit | 39984de3a8e9c16c0fee320a579cb465d0ce7314 (patch) | |
tree | 6de01c6f9ff381e7c3ade269ed1efbd1f685ab6e /t/op/sort.t | |
parent | 9c744f4f4d7678009336db8141276918751b7c52 (diff) | |
download | perl-39984de3a8e9c16c0fee320a579cb465d0ce7314.tar.gz |
Stop array assignment from leaking on croak
This made a to-do test in sort.t pass, but adventitiously, so I modi-
fied it to fail again.
Diffstat (limited to 't/op/sort.t')
-rw-r--r-- | t/op/sort.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/op/sort.t b/t/op/sort.t index 6dedeeba55..0371f4f7a8 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -770,7 +770,8 @@ cmp_ok($answer,'eq','good','sort subr called from other package'); { local $TODO = "sort should make sure elements are not freed in the sort block"; - eval { @nomodify_x=(1..8); our @copy = sort { @nomodify_x = (0) } (@nomodify_x, 3); }; + eval { @nomodify_x=(1..8); + our @copy = sort { undef @nomodify_x; 1 } (@nomodify_x, 3); }; is($@, ""); } |