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
3b9abc8932
This commit is contained in:
parent
cef81eb8cc
commit
ead2dc0ec9
1 changed files with 1 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module Bundler
|
module Bundler
|
||||||
module GemHelpers
|
module GemHelpers
|
||||||
GENERIC_CACHE = {} # rubocop:disable MutableConstant
|
GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable MutableConstant
|
||||||
GENERICS = [
|
GENERICS = [
|
||||||
[Gem::Platform.new("java"), Gem::Platform.new("java")],
|
[Gem::Platform.new("java"), Gem::Platform.new("java")],
|
||||||
[Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
|
[Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
|
||||||
|
@ -14,8 +14,6 @@ module Bundler
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
def generic(p)
|
def generic(p)
|
||||||
return p if p == Gem::Platform::RUBY
|
|
||||||
|
|
||||||
GENERIC_CACHE[p] ||= begin
|
GENERIC_CACHE[p] ||= begin
|
||||||
_, found = GENERICS.find do |match, _generic|
|
_, found = GENERICS.find do |match, _generic|
|
||||||
p.os == match.os && (!match.cpu || p.cpu == match.cpu)
|
p.os == match.os && (!match.cpu || p.cpu == match.cpu)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue