From: Steve Peters Date: Sun, 1 Nov 2009 00:52:35 +0000 (-0500) Subject: Revert "Re: [perl #38809][PATCH] loss of stack elements with a do block inside a... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d5ba409c26980e4e27923c54014d9f9cf834221;p=p5sagit%2Fp5-mst-13.2.git Revert "Re: [perl #38809][PATCH] loss of stack elements with a do block inside a return" This reverts commit 60aa6a1aa894dd62b8194841a6d6c80c15079dba. --- diff --git a/t/op/do.t b/t/op/do.t index 3be0d3a..e47441a 100644 --- a/t/op/do.t +++ b/t/op/do.t @@ -29,7 +29,7 @@ sub ok { return $ok; } -print "1..54\n"; +print "1..50\n"; # Test do &sub and proper @_ handling. $_[0] = 0; @@ -191,18 +191,6 @@ ok($x == 4, 'if (0){} else { ...; @a } receives caller scalar context'); ok("@x" eq "24 25 26 27", 'if (0){} else { ...; @a } receives caller list context'); -# [perl #38809] -@a = (7, 8); -$x = sub { do { return do { 1; @a } }; 3 }->(); -ok(defined $x && $x == 2, 'return do { } receives caller scalar context'); -@x = sub { do { return do { 1; @a } }; 3 }->(); -ok("@x" eq "7 8", 'return do { } receives caller list context'); -@a = (7, 8, 9); -$x = sub { do { do { 1; return @a } }; 4 }->(); -ok(defined $x && $x == 3, 'do { return } receives caller scalar context'); -@x = sub { do { do { 1; return @a } }; 4 }->(); -ok("@x" eq "7 8 9", 'do { return } receives caller list context'); - END { 1 while unlink("$$.16", "$$.17", "$$.18"); }