[rubygems/rubygems] Fix encoding mismatch errors on MinGW

GNU make in MSys is localized to use UTF-8 while Ruby's filesystem
encoding is set to OEM CodePage (e.g., CP932 in Japanese Edition),
the read output from the make has broken encoding and results in
"invalid byte sequence" errors.  As `DESTDIR` is set to a US-ASCII
7bit clean string, matching as binary encoding should have no
problems.

https://github.com/rubygems/rubygems/commit/96a5e7523b
This commit is contained in:
Nobuyoshi Nakada 2020-07-25 12:15:22 +09:00 коммит произвёл Hiroshi SHIBATA
Родитель 6c19b0ec6e
Коммит db2047ebaf
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -47,7 +47,7 @@ install:
Gem::Ext::Builder.make @dest_path, results
end
results = results.join "\n"
results = results.join("\n").b
assert_match %r{"DESTDIR=#{ENV['DESTDIR']}" clean$}, results
assert_match %r{"DESTDIR=#{ENV['DESTDIR']}"$}, results
@ -78,7 +78,7 @@ install:
Gem::Ext::Builder.make @dest_path, results
end
results = results.join "\n"
results = results.join("\n").b
assert_match %r{"DESTDIR=#{ENV['DESTDIR']}" clean$}, results
assert_match %r{"DESTDIR=#{ENV['DESTDIR']}"$}, results