Skip to content

Commit

Permalink
removed unused blank lines and revert test
Browse files Browse the repository at this point in the history
  • Loading branch information
mterada1228 committed Nov 9, 2024
1 parent ee289f4 commit 182bcf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
4 changes: 1 addition & 3 deletions lib/rdoc/rubygems_hook.rb
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
11 changes: 2 additions & 9 deletions test/rdoc/test_rdoc_rubygems_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -291,4 +284,4 @@ def test_setup_unwritable
end
end

end if defined?(RDoc::RubyGemsHook)
end

0 comments on commit 182bcf9

Please sign in to comment.