summaryrefslogtreecommitdiff
path: root/lib/utf8.t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-10-28 08:48:37 -0600
committerYves Orton <demerphq@gmail.com>2022-11-14 10:29:48 +0100
commit347a477c264548540487606c624445883c79c135 (patch)
tree0957e5aab296861fe1992a1098b546fd325ce168 /lib/utf8.t
parenta503b7406f4be5b6577fc63261184ffbe58009a1 (diff)
downloadperl-347a477c264548540487606c624445883c79c135.tar.gz
utf8::upgrade: Don't coerce undef arg
This fixes GH #20419
Diffstat (limited to 'lib/utf8.t')
-rw-r--r--lib/utf8.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utf8.t b/lib/utf8.t
index d35110baee..fa69fcbb88 100644
--- a/lib/utf8.t
+++ b/lib/utf8.t
@@ -669,6 +669,9 @@ for(__PACKAGE__) {
eval { utf8::upgrade($_) };
is $@, "", 'no error with utf8::upgrade on read-only COW';
}
+
+is(utf8::upgrade(undef), undef, "Returns undef for undef input"); # GH #20419
+
# This one croaks, but not because the scalar is read-only
eval "package \x{100};\n" . <<'END'
for(__PACKAGE__) {