Skip to content

Do not associate a RBS comment to a node after a blank line #780

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
Aug 4, 2025

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Jul 21, 2025

Before this PR, the following example would fail because we tried to use the type alias as the generic signature of the class:

#: type foo = Integer

class Bar; end

@Morriar Morriar self-assigned this Jul 21, 2025
@Morriar Morriar requested a review from a team as a code owner July 21, 2025 20:39
@Morriar Morriar added the bugfix Fix a bug label Jul 21, 2025
lib/spoom/rbs.rb Outdated
Comment on lines 85 to 87
if comment_line < last_line - 1
break
end
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
if comment_line < last_line - 1
break
end
break if comment_line < last_line - 1

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar force-pushed the at-fix-type-alias branch from a9d8e00 to 07db4aa Compare August 4, 2025 15:17
@Morriar Morriar enabled auto-merge August 4, 2025 15:17
@Morriar Morriar merged commit ccd8867 into main Aug 4, 2025
8 checks passed
@Morriar Morriar deleted the at-fix-type-alias branch August 4, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants