This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #115254] Fix flag check on scope exit
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index cf656c0..5eb9ddb 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -996,7 +996,7 @@ Perl_leave_scope(pTHX_ I32 base)
                          * readonlyness so that it can go out of scope
                          * quietly
                          */
-                        if (SvREADONLY(sv) && !SvFAKE(sv))
+                        if (SvREADONLY(sv))
                             SvREADONLY_off(sv);
 
                         if (SvOOK(sv)) { /* OOK or HvAUX */