From 73633683c5a880af0207a55c6f3ea42c13cb5de1 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 20 Sep 2019 12:54:48 -0300 Subject: [rubygems/rubygems] add tests https://github.com/rubygems/rubygems/commit/8a7e27381c --- lib/rubygems/platform.rb | 2 +- test/rubygems/test_gem_platform.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index dc2640eb6d..521c552bea 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -88,7 +88,7 @@ class Gem::Platform when /^dalvik(\d+)?$/ then [ 'dalvik', $1 ] when /^dotnet$/ then [ 'dotnet', nil ] when /^dotnet([\d.]*)/ then [ 'dotnet', $1 ] - when /linux-?(\w+)?/ then [ 'linux', $1 ] + when /linux-?((?!gnu)\w+)?/ then [ 'linux', $1 ] when /mingw32/ then [ 'mingw32', nil ] when /(mswin\d+)(\_(\d+))?/ then os, version = $1, $3 diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb index 61d1966119..289f078867 100644 --- a/test/rubygems/test_gem_platform.rb +++ b/test/rubygems/test_gem_platform.rb @@ -76,6 +76,7 @@ class TestGemPlatform < Gem::TestCase 'i386-solaris2.8' => ['x86', 'solaris', '2.8'], 'mswin32' => ['x86', 'mswin32', nil], 'x86_64-linux' => ['x86_64', 'linux', nil], + 'x86_64-linux-musl' => ['x86_64', 'linux', 'musl'], 'x86_64-openbsd3.9' => ['x86_64', 'openbsd', '3.9'], 'x86_64-openbsd4.0' => ['x86_64', 'openbsd', '4.0'], 'x86_64-openbsd' => ['x86_64', 'openbsd', nil], -- cgit v1.2.3