diff --git a/lib/rdoc/rubygems_hook.rb b/lib/rdoc/rubygems_hook.rb index 4e80edaf10..95d33d7a8a 100644 --- a/lib/rdoc/rubygems_hook.rb +++ b/lib/rdoc/rubygems_hook.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true - require 'rubygems/user_interaction' require 'fileutils' - require_relative '../rdoc' # We define the following two similar name classes in this file: @@ -284,7 +282,7 @@ def remove # Do nothing if this is NOT a default gem. return unless self.class.default_gem? - # Remove generate document for compatibility if this is a + # Remove generated document for compatibility if this is a # default gem. RubyGemsHook.new(@spec).remove end diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index 5e1ee332a2..849a7e9c57 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -2,16 +2,9 @@ require 'rubygems' require 'fileutils' require 'tmpdir' +require_relative '../../lib/rdoc/rubygems_hook' require 'test/unit' -# This test requires lib/rubygems_plugin.rb . -# To execute this test under a ruby-core, lib/rubygems_plugin.rb should be synced to ruby/ruby. -# But I don't do so and skip this test under the situation because of avoiding ambiguity about rubygems_plugins on ruby/ruby. -begin - require_relative '../../lib/rubygems_plugin' -rescue LoadError -end - class TestRDocRubyGemsHook < Test::Unit::TestCase def setup @a = Gem::Specification.new do |s| @@ -291,4 +284,4 @@ def test_setup_unwritable end end -end if defined?(RDoc::RubyGemsHook) +end