From 79b187a45ecc0f99af97631a1771092874344092 Mon Sep 17 00:00:00 2001 From: Josh Nichols Date: Wed, 16 Aug 2023 14:59:17 -0400 Subject: [rubygems/rubygems] config is a new Hash, and config.values is a new Array. that means we can use bang methods to avoid allocating new copies https://github.com/rubygems/rubygems/commit/8bc13fa55f --- lib/bundler/settings.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/bundler/settings.rb') diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 2af9b0326b..c12d1d4f74 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -99,7 +99,11 @@ module Bundler def [](name) key = key_for(name) - value = configs.values.map {|config| config[key] }.compact.first + + values = configs.values + values.map! {|config| config[key] } + values.compact! + value = values.first converted_value(value, name) end -- cgit v1.2.3