Skip to content

Surface method signatures to the Ruby API #668

@vinistock

Description

@vinistock

We need to be able to read method signatures to provide signature help in the Ruby LSP.

There's one interesting caveat to investigate. We don't eagerly resolve method aliases and their signatures are attached to the method they target. For example:

class Parent
  def foo(a, b); end
end

class Child < Parent
  alias_method :new_foo, :foo
end

The signature for new_foo should be [PositionalRequired(a), PositionalRequired(b)] coming from the original foo.

Investigate if we can resolve method aliases lazily to return signatures (and consider splitting the work into separate PRs if necessary).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions