This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp.c: Remove useless read-only check from S_do_chomp
[perl5.git] / pp.c
diff --git a/pp.c b/pp.c
index a6e2f4e..9325d0e 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -797,7 +797,7 @@ S_do_chomp(pTHX_ SV *retval, SV *sv, bool chomping)
             /* SV is copy-on-write */
            sv_force_normal_flags(sv, 0);
         }
-        if (SvREADONLY(sv))
+        else
             Perl_croak_no_modify(aTHX);
     }