summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-12-25 12:14:10 +0000
committerDavid Mitchell <davem@iabyn.com>2016-12-25 18:02:53 +0000
commit523e5ba86c48932471bfe24c81d5c860ade5fb44 (patch)
tree62f468576eb3af8843bcef9425eff5ef86e08188 /sv.c
parent4ee2b8db537d28b77d127a86307e426289e5c8b5 (diff)
downloadperl-523e5ba86c48932471bfe24c81d5c860ade5fb44.tar.gz
fix (*glob) = ()
RT #130385 The new sv_set_undef() function added by me with v5.25.7-12-ge03e82a didn't handle undeffing a glob correctly, and gave an assertion failure. Fix it to behave more exactly like (sv_setsv(sv, &PL_sv_undef), which it is documented as being identical to.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 0382e961e7..e3026f7d33 100644
--- a/sv.c
+++ b/sv.c
@@ -4834,8 +4834,8 @@ Perl_sv_set_undef(pTHX_ SV *sv)
if (isGV_with_GP(sv))
Perl_ck_warner(aTHX_ packWARN(WARN_MISC),
"Undefined value assigned to typeglob");
-
- SvOK_off(sv);
+ else
+ SvOK_off(sv);
}