Skip to content

Commit 598df7b

Browse files
Benabikgitster
authored andcommitted
t/gitweb-lib: Don't pass constant to decode_utf8
Encode.pm started updating the string to decode in-place when a second argument is passed in version 2.40. This causes 'decode_utf8("", Encode::FB_CROAK)' to die with a message like: Modification of a read-only value attempted at .../Encode.pm line 216. Work around this by passing an empty variable instead of a constant string. Signed-off-by: Brian Gernhardt <[email protected]> Acked-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5b57413 commit 598df7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/gitweb-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ if ! test_have_prereq PERL; then
8080
test_done
8181
fi
8282

83-
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
83+
perl -MEncode -e '$e="";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {
8484
skip_all='skipping gitweb tests, perl version is too old'
8585
test_done
8686
}

0 commit comments

Comments
 (0)