From e69d314a972ec5ae95b49f4dd1c76f9b3892a076 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 20:40:02 +0000 Subject: [PATCH 01/16] Add RDoc coverage check for C extensions in ruby-core CI Run `rdoc -C` against ext/io/console in ruby/ruby to catch coverage regressions for C extensions that use :stopdoc: directives. --- .github/workflows/ruby-core.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 57093a11b0..d43aaad234 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,6 +66,9 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc + - name: Run RDoc coverage check on C extensions + run: ruby -I../rdoc/lib ../rdoc/exe/rdoc -C -q ext/io/console + working-directory: ruby/ruby - name: Generate Documentation with RDoc run: make html working-directory: ruby/ruby From cd224196f3a5e432b83cc783ba011089cbf51ccb Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 20:41:28 +0000 Subject: [PATCH 02/16] Use bundle exec rdoc for coverage check --- .github/workflows/ruby-core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index d43aaad234..9e60ec73f4 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -67,8 +67,8 @@ jobs: bundle exec rake build:local_ruby working-directory: ruby/rdoc - name: Run RDoc coverage check on C extensions - run: ruby -I../rdoc/lib ../rdoc/exe/rdoc -C -q ext/io/console - working-directory: ruby/ruby + run: bundle exec rdoc -C -q ../ruby/ext/io/console + working-directory: ruby/rdoc - name: Generate Documentation with RDoc run: make html working-directory: ruby/ruby From d40b33783de2ff0457925cb78db031e841f57aca Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 20:43:55 +0000 Subject: [PATCH 03/16] Run full ruby/ruby rdoc-coverage check, matching misc CI --- .github/workflows/ruby-core.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 9e60ec73f4..120a5ba1c5 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,9 +66,9 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc - - name: Run RDoc coverage check on C extensions - run: bundle exec rdoc -C -q ../ruby/ext/io/console - working-directory: ruby/rdoc + - name: Core docs coverage + run: make XRUBY=ruby RDOC_DEPENDS= RBCONFIG=update-rbconfig rdoc-coverage + working-directory: ruby/ruby - name: Generate Documentation with RDoc run: make html working-directory: ruby/ruby From d3108eb89ff9fcae34f5eab239ef8db41c6e9276 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 20:45:23 +0000 Subject: [PATCH 04/16] Use bundle exec rdoc with local Gemfile for coverage check Use BUNDLE_GEMFILE to ensure the coverage check runs against the locally checked out RDoc, not the system-installed version. --- .github/workflows/ruby-core.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 120a5ba1c5..569502d3f5 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -67,7 +67,12 @@ jobs: bundle exec rake build:local_ruby working-directory: ruby/rdoc - name: Core docs coverage - run: make XRUBY=ruby RDOC_DEPENDS= RBCONFIG=update-rbconfig rdoc-coverage + run: > + BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C + -x ^ext/json -x ^ext/openssl -x ^ext/psych + -x ^lib/bundler -x ^lib/rubygems + -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest + . working-directory: ruby/ruby - name: Generate Documentation with RDoc run: make html From f13101b67fcf80112e099833eb4d7890d83ffde1 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 20:47:22 +0000 Subject: [PATCH 05/16] Add comment explaining -x exclusions origin --- .github/workflows/ruby-core.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 569502d3f5..b5992c5d9c 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -67,6 +67,7 @@ jobs: bundle exec rake build:local_ruby working-directory: ruby/rdoc - name: Core docs coverage + # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk run: > BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C -x ^ext/json -x ^ext/openssl -x ^ext/psych From 711b6482729b2448b4c54433a601807392d5034a Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 20:51:11 +0000 Subject: [PATCH 06/16] Split coverage check to isolate io-console stopdoc failure Run coverage in two steps: 1. Full ruby/ruby excluding io-console (must pass - no regressions) 2. io-console only (fails due to stopdoc bug, passes with fix) This proves the failure is isolated to io-console's :stopdoc: handling. --- .github/workflows/ruby-core.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index b5992c5d9c..0c1a067773 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,15 +66,22 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc - - name: Core docs coverage - # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk + - name: Core docs coverage (excluding io-console) + # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk, + # plus ext/io/console which is checked separately below. run: > BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C -x ^ext/json -x ^ext/openssl -x ^ext/psych -x ^lib/bundler -x ^lib/rubygems -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest + -x ^ext/io/console . working-directory: ruby/ruby + - name: Core docs coverage (io-console) + run: > + BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C + ext/io/console + working-directory: ruby/ruby - name: Generate Documentation with RDoc run: make html working-directory: ruby/ruby From 20d39455549d3358299a9d8889054ba7cd6d5af5 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:00:28 +0000 Subject: [PATCH 07/16] Revert to single full coverage check Running from ruby/ruby with .document file present, the coverage check correctly shows only io-console failures (2 undocumented items). The split was unnecessary. --- .github/workflows/ruby-core.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 0c1a067773..b5992c5d9c 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,22 +66,15 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc - - name: Core docs coverage (excluding io-console) - # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk, - # plus ext/io/console which is checked separately below. + - name: Core docs coverage + # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk run: > BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C -x ^ext/json -x ^ext/openssl -x ^ext/psych -x ^lib/bundler -x ^lib/rubygems -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest - -x ^ext/io/console . working-directory: ruby/ruby - - name: Core docs coverage (io-console) - run: > - BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C - ext/io/console - working-directory: ruby/ruby - name: Generate Documentation with RDoc run: make html working-directory: ruby/ruby From b47d7889ef6ae40cffc0a1e976a5b473ff036a73 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:03:25 +0000 Subject: [PATCH 08/16] Use ruby -I to load local RDoc instead of bundle exec bundle exec changes the gem environment and causes different file processing (5321 items vs 9582 expected), leading to false Prism failures. Using ruby -I matches how tool/rdoc-srcdir overrides the load path in ruby/ruby. --- .github/workflows/ruby-core.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index b5992c5d9c..b19adfd775 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -67,9 +67,11 @@ jobs: bundle exec rake build:local_ruby working-directory: ruby/rdoc - name: Core docs coverage - # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk + # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk. + # Use -I to load the locally checked out RDoc, matching how + # tool/rdoc-srcdir overrides the load path in ruby/ruby. run: > - BUNDLE_GEMFILE=../rdoc/Gemfile bundle exec rdoc --quiet -C + ruby -I../rdoc/lib ../rdoc/exe/rdoc --quiet -C -x ^ext/json -x ^ext/openssl -x ^ext/psych -x ^lib/bundler -x ^lib/rubygems -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest From 4fe599acedeec23062fa1c4863ec6be397225074 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:06:31 +0000 Subject: [PATCH 09/16] Generate rbconfig.rb and bypass gem activation in coverage check Two fixes: 1. Generate rbconfig.rb first (make update-rbconfig), matching ruby/ruby's rdoc-coverage target prerequisite. 2. Use ruby -I -r instead of exe/rdoc to avoid gem 'rdoc' call that could override the load path with the system rdoc. --- .github/workflows/ruby-core.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index b19adfd775..af1f0d30b4 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,12 +66,17 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc + - name: Generate rbconfig.rb + run: make update-rbconfig + working-directory: ruby/ruby - name: Core docs coverage # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk. - # Use -I to load the locally checked out RDoc, matching how - # tool/rdoc-srcdir overrides the load path in ruby/ruby. + # Use -I to load the locally checked out RDoc and bypass exe/rdoc's + # gem activation which could override the load path. run: > - ruby -I../rdoc/lib ../rdoc/exe/rdoc --quiet -C + ruby -I../rdoc/lib -r rdoc/rdoc + -e 'RDoc::RDoc.new.document ARGV' -- + --quiet -C -x ^ext/json -x ^ext/openssl -x ^ext/psych -x ^lib/bundler -x ^lib/rubygems -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest From a04c56fae3eae26093c98a567043b50c910bc18a Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:09:17 +0000 Subject: [PATCH 10/16] Use ruby -I -S rdoc for coverage check Drop rbconfig.rb generation (not needed for coverage) and use ruby -I -S rdoc which matches the local testing approach that correctly shows only io-console failures. --- .github/workflows/ruby-core.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index af1f0d30b4..d9ca299bc1 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,17 +66,12 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc - - name: Generate rbconfig.rb - run: make update-rbconfig - working-directory: ruby/ruby - name: Core docs coverage # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk. - # Use -I to load the locally checked out RDoc and bypass exe/rdoc's - # gem activation which could override the load path. + # Use -I to load the locally checked out RDoc and -S to find the + # rdoc executable, matching how tool/rdoc-srcdir works in ruby/ruby. run: > - ruby -I../rdoc/lib -r rdoc/rdoc - -e 'RDoc::RDoc.new.document ARGV' -- - --quiet -C + ruby -I../rdoc/lib -S rdoc --quiet -C -x ^ext/json -x ^ext/openssl -x ^ext/psych -x ^lib/bundler -x ^lib/rubygems -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest From 7030bf0544b76bdd730f0bc7b5784c5e851f5a12 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:14:13 +0000 Subject: [PATCH 11/16] Run coverage after make html, use make rdoc-coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the coverage step after make html so the build environment is fully set up. Use make rdoc-coverage matching ruby/ruby's check_misc workflow — build:local_ruby already installs our RDoc into the ruby tree so tool/rdoc-srcdir picks it up. --- .github/workflows/ruby-core.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index d9ca299bc1..6c7b7f0133 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -66,19 +66,16 @@ jobs: gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc + - name: Generate Documentation with RDoc + run: make html + working-directory: ruby/ruby - name: Core docs coverage # Exclusions match RDOC_COVERAGE_EXCLUDES in ruby/ruby's common.mk. - # Use -I to load the locally checked out RDoc and -S to find the - # rdoc executable, matching how tool/rdoc-srcdir works in ruby/ruby. + # Run after make html so the build environment is fully set up + # (rbconfig.rb, generated files, etc.), matching ruby/ruby's CI. run: > - ruby -I../rdoc/lib -S rdoc --quiet -C - -x ^ext/json -x ^ext/openssl -x ^ext/psych - -x ^lib/bundler -x ^lib/rubygems - -x ^lib/did_you_mean -x ^lib/error_highlight -x ^lib/syntax_suggest - . - working-directory: ruby/ruby - - name: Generate Documentation with RDoc - run: make html + make XRUBY=ruby RDOC_DEPENDS= RBCONFIG=update-rbconfig + rdoc-coverage working-directory: ruby/ruby # We need to clear the generated documentation to generate them again # with the Ripper parser. From a8d3dc7b41f24564e597ce1a7fce8f65cae7e976 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 16:19:41 +0000 Subject: [PATCH 12/16] Fix :stopdoc: directive being undone for C-defined classes After parsing a C file, `parse_file` resets `done_documenting = false` on all classes in `top_level.classes_or_modules`. Since `done_documenting=` also sets `@document_self = !value`, this inadvertently resets `document_self` to `true` for classes that had `:stopdoc:` applied during parsing. This became an issue after `add_to_classes_or_modules` was added to the C parser's `handle_class_module`, which caused C-defined classes to appear in `top_level.classes_or_modules` for the first time. The fix skips the `done_documenting` reset for classes where `document_self` is already `false` (set by `:stopdoc:`), preserving the explicit directive. --- lib/rdoc/rdoc.rb | 2 +- test/rdoc/rdoc_rdoc_test.rb | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 195bd21421..a65a7d59c4 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -342,7 +342,7 @@ def parse_file(filename) # restart documentation for the classes & modules found top_level.classes_or_modules.each do |cm| - cm.done_documenting = false + cm.done_documenting = false if cm.document_self end top_level diff --git a/test/rdoc/rdoc_rdoc_test.rb b/test/rdoc/rdoc_rdoc_test.rb index f75939cb2d..69e6785618 100644 --- a/test/rdoc/rdoc_rdoc_test.rb +++ b/test/rdoc/rdoc_rdoc_test.rb @@ -358,6 +358,30 @@ def test_parse_file_encoding tf.close! end + def test_parse_file_stopdoc_in_c + @rdoc.store = RDoc::Store.new(@options) + + temp_dir do |dir| + @rdoc.options.root = Pathname(Dir.pwd) + + File.write 'test.c', <<~C + void Init_test(void) { + VALUE rb_cParent = rb_define_class("Parent", rb_cObject); + + /* :stopdoc: */ + VALUE cInternal = rb_define_class_under(rb_cParent, "Internal", rb_cObject); + /* :startdoc: */ + } + C + + top_level = @rdoc.parse_file 'test.c' + + internal = @rdoc.store.find_class_named 'Parent::Internal' + assert internal, 'Parent::Internal should exist' + refute internal.document_self, 'Parent::Internal should have document_self=false after :stopdoc:' + end + end + def test_parse_file_forbidden omit 'chmod not supported' if Gem.win_platform? omit "assumes that euid is not root" if Process.euid == 0 From 84bec6cff15bc47d6e87b97a74288137ff1c762e Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 16:20:34 +0000 Subject: [PATCH 13/16] Add clarifying comment about preserving :stopdoc: directives --- lib/rdoc/rdoc.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index a65a7d59c4..1f41a69b29 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -340,7 +340,8 @@ def parse_file(filename) parser.scan - # restart documentation for the classes & modules found + # restart documentation for the classes & modules found, + # but preserve explicit :stopdoc: directives top_level.classes_or_modules.each do |cm| cm.done_documenting = false if cm.document_self end From 22cdb7619a33b3b84ad9410b7982a7f845939938 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:41:15 +0000 Subject: [PATCH 14/16] Fix :stopdoc: in done_documenting= instead of parse_file The real issue: done_documenting= unconditionally sets document_self even when done_documenting isn't actually changing. When parse_file resets done_documenting=false on classes that already have done_documenting=false, it needlessly overrides document_self (which may have been set to false by :stopdoc:). Add an early return when the value isn't changing, so :stopdoc: state is preserved without affecting the :enddoc: reset behavior. --- lib/rdoc/code_object.rb | 1 + lib/rdoc/rdoc.rb | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rdoc/code_object.rb b/lib/rdoc/code_object.rb index c15c0129f5..bae08b077e 100644 --- a/lib/rdoc/code_object.rb +++ b/lib/rdoc/code_object.rb @@ -204,6 +204,7 @@ def documented? def done_documenting=(value) return unless @track_visibility + return if @done_documenting == value @done_documenting = value @document_self = !value @document_children = @document_self diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 1f41a69b29..195bd21421 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -340,10 +340,9 @@ def parse_file(filename) parser.scan - # restart documentation for the classes & modules found, - # but preserve explicit :stopdoc: directives + # restart documentation for the classes & modules found top_level.classes_or_modules.each do |cm| - cm.done_documenting = false if cm.document_self + cm.done_documenting = false end top_level From 9fd241877626e0c823b7e7796442804eb399d99b Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 21:52:33 +0000 Subject: [PATCH 15/16] Use @stopped_doc flag to preserve :stopdoc: across done_documenting reset The previous approach (checking done_documenting == value) was too broad and hid 501 items that should remain visible. Instead, track :stopdoc: state with a dedicated @stopped_doc flag. When done_documenting= resets document_self, it skips the reset if @stopped_doc is set. The flag is cleared by :startdoc:. This precisely preserves :stopdoc: directives without affecting classes that need the done_documenting reset for file reopening. --- lib/rdoc/code_object.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/code_object.rb b/lib/rdoc/code_object.rb index bae08b077e..497c913e46 100644 --- a/lib/rdoc/code_object.rb +++ b/lib/rdoc/code_object.rb @@ -125,6 +125,7 @@ def initialize_visibility # :nodoc: @received_nodoc = false @ignored = false @suppressed = false + @stopped_doc = false @track_visibility = true end @@ -204,9 +205,8 @@ def documented? def done_documenting=(value) return unless @track_visibility - return if @done_documenting == value @done_documenting = value - @document_self = !value + @document_self = !value unless @stopped_doc @document_children = @document_self end @@ -344,6 +344,7 @@ def start_doc @document_children = true @ignored = false @suppressed = false + @stopped_doc = false end ## @@ -354,6 +355,7 @@ def stop_doc @document_self = false @document_children = false + @stopped_doc = true end ## From a1473b8d73fe1b67c741eb0be2c8ae4c8c60b60e Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 22 Mar 2026 22:04:27 +0000 Subject: [PATCH 16/16] Set @stopped_doc only from :stopdoc: directive, not from suppress The suppress method calls stop_doc internally but should remain reversible via done_documenting=false. Only the :stopdoc: directive (processed in pre_process.rb) should set the @stopped_doc flag that prevents done_documenting= from overriding document_self. --- lib/rdoc/code_object.rb | 1 - lib/rdoc/markup/pre_process.rb | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdoc/code_object.rb b/lib/rdoc/code_object.rb index 497c913e46..a47c99fe68 100644 --- a/lib/rdoc/code_object.rb +++ b/lib/rdoc/code_object.rb @@ -355,7 +355,6 @@ def stop_doc @document_self = false @document_children = false - @stopped_doc = true end ## diff --git a/lib/rdoc/markup/pre_process.rb b/lib/rdoc/markup/pre_process.rb index db42e36b1c..d447ffd466 100644 --- a/lib/rdoc/markup/pre_process.rb +++ b/lib/rdoc/markup/pre_process.rb @@ -232,6 +232,7 @@ def handle_directive(prefix, directive, param, code_object = nil, return blankline unless code_object code_object.stop_doc + code_object.instance_variable_set(:@stopped_doc, true) blankline when 'yield', 'yields' then