summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-01-22 11:44:13 +0100
committerHiroshi SHIBATA <[email protected]>2025-01-28 15:31:47 +0900
commitc28ce7604f25d6f0b1cd03ff50d1e7bd1e21775b (patch)
tree6d5388942fe087c0bf1139fcd63b44b52af3465b /lib
parent77b1b3be30957724e2b82ac64c68ba232bdbc2bf (diff)
[rubygems/rubygems] Remove unnecessary mapping
I don't think any supported platform has these names, so the mapping should be unnecessary. https://github.com/rubygems/rubygems/commit/6b1bdfc8a8
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/gem_helpers.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index 75243873f2..56aefadc74 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -4,19 +4,18 @@ module Bundler
module GemHelpers
GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable Style/MutableConstant
GENERICS = [
- [Gem::Platform.new("java"), Gem::Platform.new("java")],
- [Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
- [Gem::Platform.new("mswin64"), Gem::Platform.new("mswin64")],
- [Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")],
- [Gem::Platform.new("x64-mingw32"), Gem::Platform.new("x64-mingw32")],
- [Gem::Platform.new("x86_64-mingw32"), Gem::Platform.new("x64-mingw32")],
- [Gem::Platform.new("x64-mingw-ucrt"), Gem::Platform.new("x64-mingw-ucrt")],
- [Gem::Platform.new("mingw32"), Gem::Platform.new("x86-mingw32")],
+ Gem::Platform.new("java"),
+ Gem::Platform.new("mswin32"),
+ Gem::Platform.new("mswin64"),
+ Gem::Platform.new("universal-mingw32"),
+ Gem::Platform.new("x64-mingw32"),
+ Gem::Platform.new("x64-mingw-ucrt"),
+ Gem::Platform.new("x86-mingw32"),
].freeze
def generic(p)
GENERIC_CACHE[p] ||= begin
- _, found = GENERICS.find do |match, _generic|
+ found = GENERICS.find do |match|
p.os == match.os && (!match.cpu || p.cpu == match.cpu)
end
found || Gem::Platform::RUBY