Skip to content

Fix C extension docs in ruby/ruby#3927

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

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

Conversation

@Earlopain
Copy link
Collaborator

@Earlopain Earlopain commented Feb 16, 2026

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
Collaborator

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

@Earlopain
Copy link
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
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