Skip to content
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

Drop unnecessary file_name parameter from Parser.for method. #1135

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jul 7, 2024

The first commit refactors RDocParser's tests without changing lib code.

The second commit removes the unnecessary file_name argument from Parser.for as it should always be the same as top_level.absolute_name. We can be sure about this because it only has one caller, and it receives the same filename value as the one that's used to create the top_level, which we know will be stored as the its absolute_name attribute.

It should be always the same as the top_level's absolute_name, so there's
no point of taking it as a separate parameter.
@st0012 st0012 merged commit 97c497d into master Jul 31, 2024
43 checks passed
@st0012 st0012 deleted the refactor-parser-for branch July 31, 2024 14:36
matzbot pushed a commit to ruby/ruby that referenced this pull request Jul 31, 2024
method.
(ruby/rdoc#1135)

* Unify top_level creation in tests

* Remove unnecessary file_name param from Parser.for

It should be always the same as the top_level's absolute_name, so there's
no point of taking it as a separate parameter.

ruby/rdoc@97c497dfbb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants