Skip to content

fix: Updated check logic for token_stream existence#346

Closed
toshimaru wants to merge 3 commits intorails:mainfrom
toshimaru:fix-ci-against-ruby-head
Closed

fix: Updated check logic for token_stream existence#346
toshimaru wants to merge 3 commits intorails:mainfrom
toshimaru:fix-ci-against-ruby-head

Conversation

@toshimaru
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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