1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Test platform's version-ness consistently

The symmetry with the "for command line" case is made more apparent.

https://github.com/rubygems/rubygems/commit/ab85d3558f
This commit is contained in:
Loic Nageleisen 2020-11-24 13:52:13 +01:00 committed by git
parent 085790bdc0
commit 615f79be3c

View file

@ -70,7 +70,7 @@ class Gem::Platform
when String then
arch = arch.split "-"
if arch.length > 2 && arch.last !~ (/\d/) # reassemble x86-linux-gnu
if arch.length > 2 && arch.last !~ /\d+(\.\d+)?$/ # reassemble x86-linux-{libc}
extra = arch.pop
arch.last << "-#{extra}"
end