This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Implement the bipolar read-only system
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index a9c73a4..cf656c0 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -986,7 +986,7 @@ Perl_leave_scope(pTHX_ I32 base)
                     /* these flags are the union of all the relevant flags
                      * in the individual conditions within */
                     if (UNLIKELY(SvFLAGS(sv) & (
-                            SVf_READONLY /* for SvREADONLY_off() */
+                            SVf_READONLY|SVf_PROTECT /*for SvREADONLY_off*/
                           | (SVs_GMG|SVs_SMG|SVs_RMG) /* SvMAGICAL() */
                           | SVf_OOK
                           | SVf_THINKFIRST)))