diff --git a/lib/rubygems.rb b/lib/rubygems.rb index bf9e92c546..9c074a375f 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -1307,6 +1307,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} autoload :DependencyList, File.expand_path('rubygems/dependency_list', __dir__) autoload :Installer, File.expand_path('rubygems/installer', __dir__) autoload :Licenses, File.expand_path('rubygems/util/licenses', __dir__) + autoload :NameTuple, File.expand_path('rubygems/name_tuple', __dir__) autoload :PathSupport, File.expand_path('rubygems/path_support', __dir__) autoload :Platform, File.expand_path('rubygems/platform', __dir__) autoload :RequestSet, File.expand_path('rubygems/request_set', __dir__) diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 5f70a2ac6b..c122287e68 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -302,6 +302,21 @@ class TestGem < Gem::TestCase assert_equal %w[a-1 b-2 c-1], loaded_spec_names end + def test_activate_bin_path_in_debug_mode + a1 = util_spec 'a', '1' do |s| + s.executables = ['exec'] + end + + install_specs a1 + + output, status = Open3.capture2e( + { "GEM_HOME" => Gem.paths.home, "DEBUG_RESOLVER" => "1" }, + Gem.ruby, "-I", File.expand_path("../../lib", __dir__), "-e", "\"Gem.activate_bin_path('a', 'exec', '>= 0')\"" + ) + + assert status.success?, output + end + def test_activate_bin_path_gives_proper_error_for_bundler bundler = util_spec 'bundler', '2' do |s| s.executables = ['bundle']