fix: alias to a method with call-seq should render properly if the call-seq does not specify the alias #840
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the problem
Fixes #792.
If I have this ruby code:
The alias
bar
is rendered poorly:After this change, it gracefully falls back to using the underlying method's param-seq:
Explanation
The call-seq deduplication introduced in b792230 and refined in 0ead786 returns a blank string if the alias's underlying method does not name the alias in its call-seq.
This change fixes alias call-seq to return nil in this case, which in turn means that the darkfish template will use
#param_seq
instead of rendering with a missingmethod-heading
div.This change also backfills test coverage for b792230 and 0ead786 to ensure deduplication still works as expected.