From 378bffb464fa9067b6c0a76b07f4471e43c3cc06 Mon Sep 17 00:00:00 2001 From: tompng Date: Sun, 30 Aug 2026 20:02:10 +0900 Subject: [PATCH] Followup of #1800: remove unused code/comment --- lib/rdoc/code_object/context.rb | 2 +- lib/rdoc/parser/ruby.rb | 1 - test/rdoc/rdoc_stats_test.rb | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/rdoc/code_object/context.rb b/lib/rdoc/code_object/context.rb index ce97608f4d..ccc9203141 100644 --- a/lib/rdoc/code_object/context.rb +++ b/lib/rdoc/code_object/context.rb @@ -108,7 +108,7 @@ class RDoc::Context < RDoc::CodeObject attr_reader :constants_hash ## - # Creates an unnamed empty context with public current visibility + # Creates an unnamed empty context def initialize super diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index 29e778bcd6..6e943e5d6d 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -629,7 +629,6 @@ def add_alias_method(old_name, new_name, line_no) handle_code_object_directives(@container, directives) if directives return if document_suppressed? - visibility = @container.find_method(old_name, @singleton)&.visibility || :public a = RDoc::Alias.new(old_name, new_name, comment, singleton: @singleton) handle_modifier_directive(a, line_no) a.store = @store diff --git a/test/rdoc/rdoc_stats_test.rb b/test/rdoc/rdoc_stats_test.rb index 24dab802e8..43755c5154 100644 --- a/test/rdoc/rdoc_stats_test.rb +++ b/test/rdoc/rdoc_stats_test.rb @@ -83,8 +83,6 @@ def test_report_constant end def test_report_constant_alias - mod = @tl.add_module RDoc::NormalModule, 'M' - c = @tl.add_class RDoc::NormalClass, 'C' ca = RDoc::Constant.new 'CA', nil, nil