Skip to content

Fix C extension docs in ruby/ruby#3927

Merged
kddnewton merged 1 commit into
ruby:mainfrom
Earlopain:c-ruby-docs
Feb 16, 2026
Merged

Fix C extension docs in ruby/ruby#3927
kddnewton merged 1 commit into
ruby:mainfrom
Earlopain:c-ruby-docs

Conversation

@Earlopain

@Earlopain Earlopain commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator

Because ruby/ruby doesn't use our rake task it also uses the default markup (rdoc), unless specified otherwise. #3572 already added it explicitly to ruby files.

For C however, it is not so easy because of a rdoc bug: ruby/rdoc#1597 Adding the comment would remove all documentation since it gets parsed as ruby.

So, specify it for each method individually. Remove it from the template since there is only one C file relevant for rdoc. Fixes this:

image

which is hopefully the last issue. I diffed the docs in ruby/prism and this creates no difference here.

Because ruby/ruby doesn't use our rake task it also uses the default markup (rdoc), unless specified otherwise.
github.com/ruby/pull/3572 already added it explicitly to ruby files.

For C however, it is not so easy because of a rdoc bug: ruby/rdoc#1597
Adding the comment would remove all documentation since it gets parsed as ruby.

So, specify it for each method individually. Remove it from the template since there is only one C file relevant for rdoc.
@kddnewton

Copy link
Copy Markdown
Collaborator

Honestly instead of doing this I'd be more keen to just use actual rdoc syntax

@Earlopain

Copy link
Copy Markdown
Collaborator Author

Rdoc will switch the default to markdown in the future https://github.com/ruby/rdoc/?tab=readme-ov-file#markup-formats

No clue when that actually happens but in the future we can just remove all these comments (and in ruby files too)

@kddnewton
kddnewton merged commit 4ee9b1b into ruby:main Feb 16, 2026
67 checks passed
@Earlopain
Earlopain deleted the c-ruby-docs branch February 20, 2026 12:44
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.

2 participants