Skip to content

Commit 3a938f2

Browse files
committed
run/locale.t: Don't do extra work
The desired value has already been cached under a different name.
1 parent 93d6320 commit 3a938f2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

t/run/locale.t

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,10 +655,8 @@ EOF
655655
}
656656

657657
SKIP: { # GH #20085
658-
my @utf8_locales = find_utf8_ctype_locales();
659-
skip "didn't find a UTF-8 locale", 1 unless @utf8_locales;
660-
661-
local $ENV{LC_CTYPE} = $utf8_locales[0];
658+
skip "didn't find a suitable UTF-8 locale", 1 unless $utf8_ref;
659+
local $ENV{LC_CTYPE} = $utf8_ref->[0];
662660
local $ENV{LC_ALL} = undef;
663661
fresh_perl_is(<<~'EOF', "ok\n", {}, "check that setlocale overrides startup");
664662
use POSIX;

0 commit comments

Comments
 (0)