summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 237b404c86..d2a8db008a 100644
--- a/mg.c
+++ b/mg.c
@@ -1103,9 +1103,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setiv(sv, (IV)IoPAGE(GvIOp(PL_defoutgv)));
break;
case ':':
- break;
case '/':
- sv_setsv(sv, PL_rs);
break;
case '[':
sv_setiv(sv, 0);
@@ -2869,6 +2867,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
);
}
} else {
+ sv_setsv(sv, PL_rs);
/* diag_listed_as: Setting $/ to %s reference is forbidden */
Perl_croak(aTHX_ "Setting $/ to a%s %s reference is forbidden",
*reftype == 'A' ? "n" : "", reftype);