[perl #3105] Make 1..3 modification safe
authorFather Chrysostomos <sprout@cpan.org>
Sun, 23 Jun 2013 01:46:00 +0000 (18:46 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 26 Jul 2013 06:48:00 +0000 (23:48 -0700)
commit5608dcc62313f26a4bf696abe8e5fe687335a7e1
tree1bfc56fdb4eedf0783ebe0f59a699c4b8a6ba4eb
parent2ca971d50b815fd6da6adac5c6691ac438237e05
[perl #3105] Make 1..3 modification safe

This construct is optimised at compile time to an anonymous array with
an implicit @{} around it if both arguments are constant.  Modifying
elements of that array produces wrong results the next time the same
code is executed.

If we mark each element of the array as PADTMP, then it will be
treated like an operator’s return value (which it is) and get copied
as appropriate.
op.c
t/op/range.t
t/op/svleak.t