1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] [GemHelpers] Remove the special code path for ruby platform being its own generic

https://github.com/bundler/bundler/commit/3b9abc8932
This commit is contained in:
Samuel Giddins 2018-11-25 13:23:55 +00:00 committed by Hiroshi SHIBATA
parent cef81eb8cc
commit ead2dc0ec9
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -2,7 +2,7 @@
module Bundler
module GemHelpers
GENERIC_CACHE = {} # rubocop:disable MutableConstant
GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable MutableConstant
GENERICS = [
[Gem::Platform.new("java"), Gem::Platform.new("java")],
[Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
@ -14,8 +14,6 @@ module Bundler
].freeze
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)