From 167985dc871aca74d1b50f3766da1b775f7962e9 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 30 Jan 2025 17:35:04 +0900 Subject: [PATCH] Handle environment where GEM_HOME is not available --- spec/ruby/library/rubygems/gem/bin_path_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/ruby/library/rubygems/gem/bin_path_spec.rb b/spec/ruby/library/rubygems/gem/bin_path_spec.rb index d9242f438d..0b8c4db08b 100644 --- a/spec/ruby/library/rubygems/gem/bin_path_spec.rb +++ b/spec/ruby/library/rubygems/gem/bin_path_spec.rb @@ -22,7 +22,7 @@ describe "Gem.bin_path" do end skip "Could not find the default gemspecs" unless Dir.exist?(default_specifications_dir) - skip "default_specifications_dir mismatch with GEM_HOME" unless default_specifications_dir.include?(ENV['GEM_HOME']) + skip "default_specifications_dir mismatch with GEM_HOME" if ENV["GEM_HOME"] && !default_specifications_dir.start_with?(ENV['GEM_HOME']) Gem::Specification.each_spec([default_specifications_dir]) do |spec| spec.executables.each do |exe|