diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-23 07:08:24 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-07-25 23:48:00 -0700 |
commit | 2484f8dbbb584bb7bc7107e23ebd49f694eb3ea2 (patch) | |
tree | 70cc9582216e85b9e6499e674cb7d2a77dae7b88 /op.c | |
parent | 8e079c2a69673209538b040ae2389f2248682dd9 (diff) | |
download | perl-2484f8dbbb584bb7bc7107e23ebd49f694eb3ea2.tar.gz |
Stop folding of ops from changing mutability
If $a+$b produces a mutable value, then so should 1+2.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3333,6 +3333,7 @@ S_fold_constants(pTHX_ OP *o) op_free(o); #endif assert(sv); + if (!SvIMMORTAL(sv)) SvPADTMP_on(sv); if (type == OP_RV2GV) newop = newGVOP(OP_GV, 0, MUTABLE_GV(sv)); else |