mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Import RubyGems 2.1
* test/rubygems: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cd9f9e4719
commit
47f0248b08
113 changed files with 4964 additions and 2610 deletions
|
@ -2,6 +2,8 @@ require "rubygems/deprecate"
|
|||
|
||||
##
|
||||
# Available list of platforms for targeting Gem installations.
|
||||
#
|
||||
# See `gem help platform` for information on platform matching.
|
||||
|
||||
class Gem::Platform
|
||||
|
||||
|
@ -129,12 +131,16 @@ 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.
|
||||
#
|
||||
# Additionally, the platform will match if the local CPU is 'arm' and the
|
||||
# other CPU starts with "arm" (for generic ARM family support).
|
||||
|
||||
def ===(other)
|
||||
return nil unless Gem::Platform === other
|
||||
|
||||
# cpu
|
||||
(@cpu == 'universal' or other.cpu == 'universal' or @cpu == other.cpu) and
|
||||
(@cpu == 'universal' or other.cpu == 'universal' or @cpu == other.cpu or
|
||||
(@cpu == 'arm' and other.cpu =~ /\Aarm/)) and
|
||||
|
||||
# os
|
||||
@os == other.os and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue