Class: Gem::Platform
| Relationships & Source Files | |
| Inherits: | Object | 
| Defined in: | lib/bundler/rubygems_ext.rb | 
Constant Summary
- 
    JAVA =
    
 # File 'lib/bundler/rubygems_ext.rb', line 241Gem::Platform.new("java") 
- 
    MINGW =
    
 # File 'lib/bundler/rubygems_ext.rb', line 244Gem::Platform.new("x86-mingw32") 
- 
    MSWIN =
    
 # File 'lib/bundler/rubygems_ext.rb', line 242Gem::Platform.new("mswin32") 
- 
    MSWIN64 =
    
 # File 'lib/bundler/rubygems_ext.rb', line 243Gem::Platform.new("mswin64") 
- 
    REUSE_AS_BINARY_ON_TRUFFLERUBY =
    
 # File 'lib/bundler/rubygems_ext.rb', line 289%w[libv8 libv8-node sorbet-static].freeze 
- 
    WINDOWS =
    
 # File 'lib/bundler/rubygems_ext.rb', line 247[MSWIN, MSWIN64, MINGW, X64_MINGW].flatten.freeze 
- 
    X64_LINUX =
    
 # File 'lib/bundler/rubygems_ext.rb', line 248Gem::Platform.new("x86_64-linux") 
- 
    X64_LINUX_MUSL =
    
 # File 'lib/bundler/rubygems_ext.rb', line 249Gem::Platform.new("x86_64-linux-musl") 
- 
    X64_MINGW =
    
 # File 'lib/bundler/rubygems_ext.rb', line 245[Gem::Platform.new("x64-mingw32"), Gem::Platform.new("x64-mingw-ucrt")].freeze 
Instance Method Summary
- #===(other)
- 
    
      #normalized_linux_version_ext  
    
    This is a copy of RubyGems 3.3.23 or higher normalized_linux_method.
Instance Method Details
#===(other)
[ GitHub ]# File 'lib/bundler/rubygems_ext.rb', line 254
def ===(other) return nil unless Gem::Platform === other # universal-mingw32 matches x64-mingw-ucrt return true if (@cpu == "universal" || other.cpu == "universal") && @os.start_with?("mingw") && other.os.start_with?("mingw") # cpu ([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu || (@cpu == "arm" && other.cpu.start_with?("arm"))) && # os @os == other.os && # version ( (@os != "linux" && (@version.nil? || other.version.nil?)) || (@os == "linux" && (normalized_linux_version_ext == other.normalized_linux_version_ext || ["musl#{@version}", "musleabi#{@version}", "musleabihf#{@version}"].include?(other.version))) || @version == other.version ) end
#normalized_linux_version_ext
This is a copy of RubyGems 3.3.23 or higher normalized_linux_method. Once only 3.3.23 is supported, we can use the method in RubyGems.
# File 'lib/bundler/rubygems_ext.rb', line 278
def normalized_linux_version_ext return nil unless @version without_gnu_nor_abi_modifiers = @version.sub(/\Agnu/, "").sub(/eabi(hf)?\Z/, "") return nil if without_gnu_nor_abi_modifiers.empty? without_gnu_nor_abi_modifiers end