diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2018-11-25 13:23:55 +0000 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:57 +0900 |
commit | ead2dc0ec998ef0453f99e24971a1d598f7522fe (patch) | |
tree | 95224dd1025a24ec8dd605028f3ced1c2f160601 /lib | |
parent | cef81eb8ccb38deaf5d0bd3c5d6c5fdbcc920d38 (diff) | |
download | ruby-ead2dc0ec998ef0453f99e24971a1d598f7522fe.tar.gz |
[bundler/bundler] [GemHelpers] Remove the special code path for ruby platform being its own generic
https://github.com/bundler/bundler/commit/3b9abc8932
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) |