summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-23 08:17:30 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-23 08:17:30 +0000
commit872465582bf743a066e1240f2c3e941735674827 (patch)
tree213664ae2c9b0a4f594b57eee46b5b4d457738aa /op.c
parent1ee987245c095afd177d3e2ca6255cec8dbb53ca (diff)
downloadperl-872465582bf743a066e1240f2c3e941735674827.tar.gz
fix localization in while BLOCK when there is a continue BLOCK
by introducing an explicit scope (c.f. change#4848) p4raw-link: @4848 on //depot/perl: 1ee987245c095afd177d3e2ca6255cec8dbb53ca p4raw-id: //depot/perl@4849
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/op.c b/op.c
index cdb4b231b0..06b6a7066a 100644
--- a/op.c
+++ b/op.c
@@ -3753,6 +3753,9 @@ Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP *
if (!block)
block = newOP(OP_NULL, 0);
+ else if (cont) {
+ block = scope(block);
+ }
if (cont)
next = LINKLIST(cont);