Skip to content

Support RDoc 8 formatter initialization - #2109

Merged
zkoppert merged 8 commits into
masterfrom
joelhawksley-rdoc-8-compatibility
Oct 15, 2026
Merged

zkoppert merged 8 commits into
masterfrom
joelhawksley-rdoc-8-compatibility

Conversation

@joelhawksley

@joelhawksley joelhawksley commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

RDoc 8 changed RDoc::Markup::ToHtml to accept keyword options, so passing a positional RDoc::Options raises ArgumentError.

  • Pass positional options only for RDoc 4–7; preserve the zero-argument constructor for earlier versions and use it for RDoc 8+.
  • The version branch is :nocov: since each run covers only the installed RDoc. The existing test_rdoc fixture test fails on RDoc 8 without this fix, and CI now runs it against RDoc 8.
  • Test RDoc 7.2 across the existing Ruby CI matrix and RDoc 8.x on Ruby 4.0, keeping the default development lockfile unchanged, and update installation/testing docs.
  • Relax the runtime dependency added in Declare compatible RDoc as a runtime dependency #2104 from rdoc < 8 to rdoc < 9.

Validation

After rebasing on master, re-ran bundle exec rake on Ruby 3.4.10 against RDoc 7.2.0 and 8.1.0: 62 runs, 0 failures, 100% line/branch coverage.

joelhawksley and others added 2 commits October 15, 2026 12:02
Preserve positional options for RDoc 4–7 and use the keyword-based formatter defaults for RDoc 8. Add regression coverage and test RDoc 7.2 and 8.x in CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 04620c2c-d05c-4684-9275-33956737b425
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 93ffdf64-9ffd-47b4-b3d4-96dda4ae722d
@joelhawksley
joelhawksley force-pushed the joelhawksley-rdoc-8-compatibility branch from ab78de4 to 30f50d6 Compare October 15, 2026 18:05
Comment thread README.md Outdated
joelhawksley and others added 2 commits October 15, 2026 12:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 93ffdf64-9ffd-47b4-b3d4-96dda4ae722d
Comment thread test/coverage_test.rb Outdated
joelhawksley and others added 4 commits October 15, 2026 12:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 93ffdf64-9ffd-47b4-b3d4-96dda4ae722d
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 93ffdf64-9ffd-47b4-b3d4-96dda4ae722d
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 93ffdf64-9ffd-47b4-b3d4-96dda4ae722d
@joelhawksley
joelhawksley requested a max review from Copilot October 15, 2026 18:33
@joelhawksley
joelhawksley marked this pull request as ready for review October 15, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broader runtime dependency range and renamed CI checks warrant maintainer confirmation.

0 open findings

What changed in this PR

Adds RDoc 8 rendering support while preserving initialization behavior for earlier versions.

Changes:

  • Selects the formatter constructor by RDoc version and permits RDoc versions below 9.
  • Adds RDoc 8 CI coverage while retaining the default RDoc 7.2 lockfile.
  • Updates installation and testing documentation.
File Description
test/​coverage_test.rb Removes an outdated legacy-branch comment.
README.md Removes the obsolete RDoc installation pin.
lib/​github/​markup/​rdoc.rb Selects version-compatible formatter initialization.
github-markup.gemspec Allows RDoc 8 as a runtime dependency.
Gemfile.lock Updates the dependency bound while retaining RDoc 7.2.
Gemfile Makes the development RDoc requirement configurable.
CONTRIBUTING.md Documents local RDoc 8 testing.
.github/​workflows/​ci.yml Adds RDoc 8 testing on Ruby 4.0.

🧠 Review effort: Max


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zkoppert
zkoppert merged commit d5331d0 into master Oct 15, 2026
19 checks passed
@zkoppert
zkoppert deleted the joelhawksley-rdoc-8-compatibility branch October 15, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants