diff options
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -5586,7 +5586,14 @@ PP(pp_reverse) SV * const tmp = *begin; *begin++ = *end; *end-- = tmp; + + if (tmp && SvWEAKREF(tmp)) + sv_rvunweaken(tmp); } + + /* make sure we catch the middle element */ + if (begin == end && *begin && SvWEAKREF(*begin)) + sv_rvunweaken(*begin); } } } |