From ead2dc0ec998ef0453f99e24971a1d598f7522fe Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Sun, 25 Nov 2018 13:23:55 +0000 Subject: [bundler/bundler] [GemHelpers] Remove the special code path for ruby platform being its own generic https://github.com/bundler/bundler/commit/3b9abc8932 --- lib/bundler/gem_helpers.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/bundler/gem_helpers.rb') 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) -- cgit v1.2.3