diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-03-29 18:41:09 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-04-04 11:30:02 +0900 |
commit | 0930231361a72e4c45fde8865e29473fa8e76fce (patch) | |
tree | 4db2b594ffae044a514d164a53d60528e8cd687f /lib/rubygems/config_file.rb | |
parent | 0be7133b7fd08c96e33e889bb034f90df445453d (diff) |
[rubygems/rubygems] Allow to use String keys some of configuration
https://github.com/rubygems/rubygems/commit/ee0bef2786
Diffstat (limited to 'lib/rubygems/config_file.rb')
-rw-r--r-- | lib/rubygems/config_file.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index df74ff8920..7874ad0dc9 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -210,6 +210,17 @@ class Gem::ConfigFile @hash = @hash.merge environment_config end + @hash.transform_keys! do |k| + # gemhome and gempath are not working with symbol keys + if %w[backtrace bulk_threshold verbose update_sources cert_expiration_length_days + install_extension_in_lib ipv4_fallback_enabled sources disable_default_gem_server + ssl_verify_mode ssl_ca_cert ssl_client_cert].include?(k) + k.to_sym + else + k + end + end + # HACK: these override command-line args, which is bad @backtrace = @hash[:backtrace] if @hash.key? :backtrace @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold |