diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 12:47:18 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 15:36:15 +0900 |
commit | 96741765d880b700933526a97a67345dfcd90c47 (patch) | |
tree | 565766c43e97b7deb93f2390af955465a85ee668 /lib/rubygems/platform.rb | |
parent | ed149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 (diff) |
Merge the master branch of RubyGems
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4383
Diffstat (limited to 'lib/rubygems/platform.rb')
-rw-r--r-- | lib/rubygems/platform.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index e01d0494d6..fd1c0a62ac 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -66,7 +66,7 @@ class Gem::Platform when String then arch = arch.split '-' - if arch.length > 2 and arch.last !~ /\d+(\.\d+)?$/ # reassemble x86-linux-{libc} + if arch.length > 2 and arch.last !~ /\d/ # reassemble x86-linux-gnu extra = arch.pop arch.last << "-#{extra}" end @@ -146,8 +146,7 @@ class Gem::Platform ## # Does +other+ match this platform? Two platforms match if they have the # same CPU, or either has a CPU of 'universal', they have the same OS, and - # they have the same version, or either has no version (except for 'linux' - # where the version is the libc name, with no version standing for 'gnu') + # they have the same version, or either has no version. # # Additionally, the platform will match if the local CPU is 'arm' and the # other CPU starts with "arm" (for generic ARM family support). @@ -163,10 +162,7 @@ class Gem::Platform @os == other.os and # version - ( - (@os != 'linux' and (@version.nil? or other.version.nil?)) or - @version == other.version - ) + (@version.nil? or other.version.nil? or @version == other.version) end ## |