diff options
author | Jenny Shen <jenny.shen@shopify.com> | 2023-05-16 14:26:03 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-05-23 18:37:08 +0000 |
commit | e854b050cce82b209a33f761ee8e017df0900a8a (patch) | |
tree | 3bc7fd207b849ab3ce4e41a54de631c0e113e24c /lib/rubygems/config_file.rb | |
parent | 92d6c9a7b1c3f8462e91e9b7de04b0b2012d54b3 (diff) |
[rubygems/rubygems] Modify invalid key check to accept keys with colons
https://github.com/rubygems/rubygems/commit/413033198b
Co-authored-by: Eric Herscovich <eric.herscovich@shopify.com>
Diffstat (limited to 'lib/rubygems/config_file.rb')
-rw-r--r-- | lib/rubygems/config_file.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index e44e57a599..3f26e8de8e 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -348,7 +348,7 @@ if you believe they were disclosed to a third party. begin config = self.class.load_with_rubygems_config_hash(File.read(filename)) - if config.keys.any? {|k| k.to_s.gsub(%r{https?:\/\/}, "").include?(":") } + if config.keys.any? {|k| k.to_s.gsub(%r{https?:\/\/}, "").include?(": ") } warn "Failed to load #{filename} because it doesn't contain valid YAML hash" return {} else |