ruby / ruby/rbs

Add support for `__END__` in rbs files

Open
#1,646 1 comment 0 reactions 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

(This was originally a discussion, #1610. I think it's more apt as an issue, so it's been moved here).

One thing I really like about Ruby is the fact that you can type \n__END__\n and it'll comment out the rest of the file. I use it very extensively, from testing quick snippets, to commenting out code i'm replacing, to finding where the missing end originated from.

I'd really like if we could support \n__END__\n in RBS. It'd act just like Ruby's (except for no DATA) and would "comment out" the rest of the file.

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 implementation file or test is named. Start by locating the RBS parser or lexer and existing parser tests, then compare the requested behavior with Ruby's END handling; done means the remainder of an RBS file is ignored after a standalone END marker without introducing DATA behavior.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.