Skip to content

Commit

Permalink
[rubygems/rubygems] Modify invalid key check to accept keys with colons
Browse files Browse the repository at this point in the history
rubygems/rubygems@413033198b

Co-authored-by: Eric Herscovich <eric.herscovich@shopify.com>
  • Loading branch information
2 people authored and matzbot committed May 23, 2023
1 parent 92d6c9a commit e854b05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubygems/config_file.rb
Expand Up @@ -348,7 +348,7 @@ def load_file(filename)

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
Expand Down

0 comments on commit e854b05

Please sign in to comment.