Sha256: 029d6523c53984a06552a35de508f53bb50cc061070625f588f1183ec277707b
Contents?: true
Size: 887 Bytes
Versions: 86
Compression:
Stored size: 887 Bytes
Contents
module Bundler module GemHelpers GENERIC_CACHE = {} GENERICS = [ [Gem::Platform.new('java'), Gem::Platform.new('java')], [Gem::Platform.new('mswin32'), Gem::Platform.new('mswin32')], [Gem::Platform.new('mswin64'), Gem::Platform.new('mswin64')], [Gem::Platform.new('universal-mingw32'), Gem::Platform.new('universal-mingw32')], [Gem::Platform.new('x64-mingw32'), Gem::Platform.new('x64-mingw32')], [Gem::Platform.new('x86_64-mingw32'), Gem::Platform.new('x64-mingw32')], [Gem::Platform.new('mingw32'), Gem::Platform.new('x86-mingw32')] ] def generic(p) return p if p == Gem::Platform::RUBY GENERIC_CACHE[p] ||= begin _, found = GENERICS.find do |match, _generic| p.os == match.os && (!match.cpu || p.cpu == match.cpu) end found || Gem::Platform::RUBY end end end end
Version data entries
86 entries across 58 versions & 4 rubygems