In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/84df657f04b1025e03d7845847755bde20f5a70c?hp=ad2250c8dddabeba39a143c3eff5a0f641ee9402>

- Log -----------------------------------------------------------------
commit 84df657f04b1025e03d7845847755bde20f5a70c
Author: Gerard Goossen <ger...@ggoossen.net>
Date:   Tue Nov 10 13:37:38 2009 +0100

    Test for a bug in sort where the elements are freed in the sort block.
-----------------------------------------------------------------------

Summary of changes:
 t/op/sort.t |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/t/op/sort.t b/t/op/sort.t
index 8484827..75b9a17 100644
--- a/t/op/sort.t
+++ b/t/op/sort.t
@@ -6,7 +6,7 @@ BEGIN {
     require 'test.pl';
 }
 use warnings;
-plan( tests => 146 );
+plan( tests => 147 );
 
 # these shouldn't hang
 {
@@ -768,6 +768,12 @@ cmp_ok($answer,'eq','good','sort subr called from other 
package');
     cmp_ok(substr($@,0,length($fail_msg)),'eq',$fail_msg,'bug 7567');
 }
 
+{
+    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); };
+    is($@, "");
+}
+
 
 # Sorting shouldn't increase the refcount of a sub
 {

--
Perl5 Master Repository

Reply via email to