summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
authorJosh Nichols <josh.nichols@gusto.com>2023-08-16 15:04:34 -0400
committergit <svn-admin@ruby-lang.org>2023-08-20 09:06:12 +0000
commitb97e45d01a70ba0db6ad693332b041774c65bc3e (patch)
treece378222f60489bf2e17f9bce5e979714131c8e1 /lib/bundler/settings.rb
parent2a61e1dccc85fc4c8d6d41ef246b96d0dde0096c (diff)
[rubygems/rubygems] Use ! methods on the array, since it is brand new. The individual keys are also new, so we can use ! methods on each individual one as well.
https://github.com/rubygems/rubygems/commit/f2e912b9bb
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index b3cd274f31..692cede547 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -148,9 +148,14 @@ module Bundler
def all
keys = @temporary.keys.union(@global_config.keys, @local_config.keys, @env_config.keys)
- keys.map do |key|
- key.sub(/^BUNDLE_/, "").gsub(/___/, "-").gsub(/__/, ".").downcase
- end.sort
+ keys.map! do |key|
+ key = key.delete_prefix("BUNDLE_")
+ key.gsub!("___", "-")
+ key.gsub!("__", ".")
+ key.downcase!
+ key
+ end.sort!
+ keys
end
def local_overrides