summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2018-11-25 13:23:55 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-09 12:31:01 +0200
commit3b9abc8932684fa708e396621b46c55aa444c39c (patch)
tree85c1e62020e05d307e8dc930a0b245b43af6a9ec
parent5e08e849ec451f06f9b0f46ec57e8696434db354 (diff)
downloadbundler-3b9abc8932684fa708e396621b46c55aa444c39c.tar.gz
[GemHelpers] Remove the special code path for ruby platform being its own generic
-rw-r--r--lib/bundler/gem_helpers.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index 9d35169b99..90dfb70867 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -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)