ruby / ruby/rbs

Add support for `alias $x $y`

Open
#1,647 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
2.2k
Forks
256
Avg merge
6d 17h
Merged PRs (30d)
37

Description

(Originally a discussion, #1611, I think this is more apt as an issue).

One of the lesser-known facts of ruby is you can also use alias to alias global variables to one another, such as alias $LOAD_PATH $:.

I propose we support this syntax in RBS (it'd be useful for require 'English'). It's very, very niche, but should be supported eventually for completeness.

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

No files, tests, or entry points are named. Start by locating RBS's parser and existing alias syntax tests, then trace how global-variable aliases are represented; done means alias $x $y is accepted and covered by a test, including the require 'English' use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.