diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | lib/rubygems/platform.rb | 1 | ||||
-rw-r--r-- | test/rubygems/test_gem_platform.rb | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a5de5de211..b24a8f59b0 100644 --- a/configure.ac +++ b/configure.ac @@ -4073,7 +4073,11 @@ AS_IF([test "${universal_binary-no}" = yes ], [ AC_DEFINE_UNQUOTED(RUBY_ARCH, "universal-" RUBY_PLATFORM_OS) AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS) ], [ - arch="${target_cpu}-${target_os}" + AS_IF([test "${target_os}-${rb_cv_msvcrt}" = "mingw32-ucrt" ], [ + arch="${target_cpu}-mingw-ucrt" + ], [ + arch="${target_cpu}-${target_os}" + ]) AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch") ]) diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 4b8ac31847..a5e65f9243 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -104,6 +104,7 @@ class Gem::Platform when /^dotnet([\d.]*)/ then [ 'dotnet', $1 ] when /linux-?((?!gnu)\w+)?/ then [ 'linux', $1 ] when /mingw32/ then [ 'mingw32', nil ] + when /mingw-?(\w+)?/ then [ 'mingw', $1 ] when /(mswin\d+)(\_(\d+))?/ then os, version = $1, $3 @cpu = 'x86' if @cpu.nil? and os =~ /32$/ diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb index aae0250801..8029035db1 100644 --- a/test/rubygems/test_gem_platform.rb +++ b/test/rubygems/test_gem_platform.rb @@ -122,6 +122,7 @@ class TestGemPlatform < Gem::TestCase 'i586-linux-gnu' => ['x86', 'linux', nil], 'i386-linux-gnu' => ['x86', 'linux', nil], 'i386-mingw32' => ['x86', 'mingw32', nil], + 'x64-mingw-ucrt' => ['x64', 'mingw', 'ucrt'], 'i386-mswin32' => ['x86', 'mswin32', nil], 'i386-mswin32_80' => ['x86', 'mswin32', '80'], 'i386-mswin32-80' => ['x86', 'mswin32', '80'], |