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

fix: Updated check logic for token_stream existence #346

Closed
wants to merge 3 commits into from

Conversation

toshimaru
Copy link
Contributor

Due to the change in ruby/rdoc#1055, token_stream returns empty Array instead of nil,
so update check logic for token_stream existence.


The comment says "source_url is also nil", so add a test to cover that case.

Due to the change in ruby/rdoc#1055,
`token_stream` returns empty Array instead of `nil`,
so update check logic for `token_stream` existence.
The comment says "source_url is also nil", so add a test to cover that case.
Comment on lines 873 to 875
# Unfortunately, _source_url is also nil because RDoc does not provide the
# source code location in this case.
_(source_url).must_be_nil
Copy link
Member

@jonathanhefner jonathanhefner Nov 17, 2023

Choose a reason for hiding this comment

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

The omission of this assertion is intentional.

The comment acknowledges that source_url is nil, but we wish it was not nil. Therefore, we don't want to assert that it "must be" nil.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I've reverted the commit. 👍

@toshimaru toshimaru marked this pull request as draft November 19, 2023 23:56
@toshimaru
Copy link
Contributor Author

Since ruby/rdoc#1056 has been merged, I am closing this PR.

@toshimaru toshimaru closed this Dec 6, 2023
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