diff options
author | Josh Nichols <josh.nichols@gusto.com> | 2023-08-16 15:04:34 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-20 09:06:12 +0000 |
commit | b97e45d01a70ba0db6ad693332b041774c65bc3e (patch) | |
tree | ce378222f60489bf2e17f9bce5e979714131c8e1 /lib/bundler | |
parent | 2a61e1dccc85fc4c8d6d41ef246b96d0dde0096c (diff) | |
download | ruby-b97e45d01a70ba0db6ad693332b041774c65bc3e.tar.gz |
[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')
-rw-r--r-- | lib/bundler/settings.rb | 11 |
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 |