Skip to content

Handle all definitions per file in Ruby #542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2017

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Oct 14, 2017

RDoc::Parser::C cann't discern each documents per file for one class, so RDoc::ClassModule adopts the latest comment per file, however RDoc::Parser::Ruby can take each documents per file for one class. This commit changes the behavior only when RDoc::ClassModule is for RDoc::Parser::C. Of course this works around RDoc::Parser::C.

And I checked all CRuby's documents and 2 documents change with this patch because the class/module has re-definition line without document after first definition line with document. Those are ERB (re-definitions without document: 1, 2, 3, 4) and DRb::DRbProtocol (re-definition without document). Those documents are lost now, and with this patch, those become to be treated correctly.

ref. ecae6cb, d84ada2, e033904

This closes #180.

RDoc::Parser::C cann't discern each documents per file for one class,
so RDoc::ClassModule adopts the latest comment per file, however
RDoc::Parser::Ruby can take each documents per file for one class.
This commit changes the behavior only when RDoc::ClassModule is for
RDoc::Parser::C. Of course this works around RDoc::Parser::C.
@hsbt hsbt merged commit 3dd8a10 into ruby:master Oct 24, 2017
@aycabta aycabta deleted the handle-all-definitions-per-file branch October 24, 2017 11:08
@hsbt
Copy link
Member

hsbt commented Oct 24, 2017

I understood detail of this fixes.

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.

rdoc only parses one definition per file
2 participants