Shopify / Shopify/ruby-lsp

Correctly process RBS optional self

Open
#3,776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug index-improvement pinned
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
2h 14m
Merged PRs (30d)
6

Description

We might not be taking the RBS optional self in method definitions into account correctly:

https://github.com/ruby/rbs/blob/b6d92e5a60c65eebe350425f8a0e8f51539f0248/core/kernel.rbs#L1166

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RBS optional-self example linked in core/kernel.rbs at line 1166, then trace how ruby-lsp processes optional self in method definitions. Confirm the expected handling from that definition and add coverage for the corrected behavior before verifying the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.