diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 67302dc85d..04d5776cc5 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -126,7 +126,7 @@ class Gem::Platform when /solaris-?(\d+\.\d+)?/ then ["solaris", $1] when /wasi/ then ["wasi", nil] # test - when /^(\w+_platform)(\d+)?/ then [$1, $2] + when /^(\w+_platform)-?(\d+)?/ then [$1, $2] else ["unknown", nil] end when Gem::Platform then