diff options
-rw-r--r-- | lib/rubygems/config_file.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_config_file.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index 181b9f0d42..1fdb437fbb 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -334,7 +334,7 @@ if you believe they were disclosed to a third party. yaml_errors = [ArgumentError] yaml_errors << Psych::SyntaxError if defined?(Psych::SyntaxError) - return {} unless filename and File.exist? filename + return {} unless filename && !filename.empty? && File.exist?(filename) begin content = Gem::SafeYAML.load(File.read(filename)) diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index 8127335d4f..492a0c5a05 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -19,7 +19,7 @@ class TestGemConfigFile < Gem::TestCase Gem::ConfigFile::PLATFORM_DEFAULTS.clear @env_gemrc = ENV['GEMRC'] - ENV['GEMRC'] = nil + ENV['GEMRC'] = '' util_config_file end |