Support for Inline RBS - #1173
Merged
Merged
Conversation
castwide
force-pushed
the
inline-rbs
branch
3 times, most recently
from
March 11, 2026 12:35
c3e9491 to
45f36e8
Compare
* Convert RBS implicit nil annotations * Specs * Linting * Minor linting * Documentation * Typecheck fix
castwide
marked this pull request as ready for review
May 20, 2026 00:21
Owner
Author
|
This iteration supports two syntaxes: # (short) method signatures
#: (Integer) -> String
def example(number); end
# class inheritance parameters
class Example < Array #[String]
end |
castwide
pushed a commit
that referenced
this pull request
Aug 26, 2026
`parameters_from_inline_rbs` scanned the entire class body for
`#[...]`, so any bracketed comment in the body was read as the
superclass's type arguments. `# [:b, { c: :d }]` produced the
superclass name `Base<:b, { c: :d`, which resolves to nothing, and
every inherited method in the class then reported `Unresolved call` —
including on lines above the comment.
Match only where ruby/rbs's inline syntax puts it: directly after the
superclass, on the same line, `#[` with no space, with a closing `]`
required. `class Foo < Array # [String]` is now an ordinary comment.
Also removes a leftover debug `logger.warn` from
#1173.
Fixes #1300
Claude-Session: https://claude.ai/code/session_01NtwP1oKRXfJAbPQrPHm5oU
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ref #1121