ruby-changes:62460
From: Nobuyoshi <ko1@a...>
Date: Fri, 31 Jul 2020 21:08:28 +0900 (JST)
Subject: [ruby-changes:62460] db2047ebaf (master): [rubygems/rubygems] Fix encoding mismatch errors on MinGW
https://git.ruby-lang.org/ruby.git/commit/?id=db2047ebaf From db2047ebaf4d506420432cf18ca978a1fc63a91f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 25 Jul 2020 12:15:22 +0900 Subject: [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 diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb index f03b009..abd33d2 100644 --- a/test/rubygems/test_gem_ext_builder.rb +++ b/test/rubygems/test_gem_ext_builder.rb @@ -47,7 +47,7 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L47 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: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L78 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/