summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-10-24 05:41:17 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-10-24 05:41:17 -0700
commita373464fd655c7246cf689f421efc503307b705c (patch)
tree5ef4595eced510b2ea8b5cc6548e9f87c82beb09 /pp_ctl.c
parenta9b7658f66b4773c3d3b573410a0bc5963f7e279 (diff)
downloadperl-a373464fd655c7246cf689f421efc503307b705c.tar.gz
Fix bare blocks in lvalue subs
If a bare block is the last thing in an lvalue sub, OP_LEAVELOOP needs to propagate lvalue context and handle returned arrays properly, just as OP_LEAVE has done since yesterday. This is a follow-up to 2ec7f6f24289. This came up in ticket #119797.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 4be2b194f9..c3b66bb01a 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2277,7 +2277,8 @@ PP(pp_leaveloop)
newsp = PL_stack_base + cx->blk_loop.resetsp;
TAINT_NOT;
- SP = adjust_stack_on_leave(newsp, SP, MARK, gimme, 0, FALSE);
+ SP = adjust_stack_on_leave(newsp, SP, MARK, gimme, 0,
+ PL_op->op_private & OPpLVALUE);
PUTBACK;
POPLOOP(cx); /* Stack values are safe: release loop vars ... */