Skip to content

Commit 5f725bf

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Treat nil deserialized config as empty
ruby/rubygems@368fc29ce1
1 parent 386ad8b commit 5f725bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/bundler/settings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def load_config(config_file)
476476
SharedHelpers.filesystem_access(config_file, :read) do |file|
477477
valid_file = file.exist? && !file.size.zero?
478478
return {} unless valid_file
479-
serializer_class.load(file.read).inject({}) do |config, (k, v)|
479+
(serializer_class.load(file.read) || {}).inject({}) do |config, (k, v)|
480480
k = k.dup
481481
k << "/" if /https?:/i.match?(k) && !k.end_with?("/", "__#{FALLBACK_TIMEOUT_URI_OPTION.upcase}")
482482
k.gsub!(".", "__")

0 commit comments

Comments
 (0)