Method: Gem::Platform#===

Defined in:
lib/rubygems/platform.rb

#===(other) ⇒ Object

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).



158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/rubygems/platform.rb', line 158

def ===(other)
  return nil unless Gem::Platform === other

  # cpu
  ([nil,'universal'].include?(@cpu) or [nil, 'universal'].include?(other.cpu) or @cpu == other.cpu or
  (@cpu == 'arm' and other.cpu.start_with?("arm"))) and

  # os
  @os == other.os and

  # version
  (@version.nil? or other.version.nil? or @version == other.version)
end