diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/gem_helpers.rb | 4 |
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) |