diff options
author | Petrik <[email protected]> | 2024-02-08 21:58:56 +0100 |
---|---|---|
committer | git <[email protected]> | 2024-02-09 01:07:17 +0000 |
commit | 2a57e6e6edbd848b5646a762e9351912c857706f () | |
tree | eb76c005e10cd59806a77687ae4764748402ac00 | |
parent | 5d32e328d90e435ceb5d1259438157ab5d2a4608 (diff) |
[ruby/rdoc] Don't document aliases with trailing `:nodoc` directive
Attribute readers and writers can be marked as `:nodoc` to keep them undocumented: ```ruby attr_reader :name # :nodoc: ``` For aliases this behaviour should be the same: ```ruby alias_method :old :new # :nodoc: ``` https://.com/ruby/rdoc/commit/30f14e8271
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 6 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_parser_ruby.rb | 22 |
2 files changed, 26 insertions, 2 deletions
@@ -789,8 +789,10 @@ class RDoc::Parser::Ruby < RDoc::Parser al.line = line_no read_documentation_modifiers al, RDoc::ATTR_MODIFIERS - context.add_alias al - @stats.add_alias al al end @@ -3065,6 +3065,28 @@ RUBY assert_nil m.params, 'Module parameter not removed' end def test_parse_statements_stopdoc_alias klass = @top_level.add_class RDoc::NormalClass, 'Foo' |