Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for __END__ in rbs files #1646

Open
sampersand opened this issue Nov 24, 2023 · 1 comment
Open

Add support for __END__ in rbs files #1646

sampersand opened this issue Nov 24, 2023 · 1 comment

Comments

@sampersand
Copy link
Contributor

(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.

@soutaro
Copy link
Member

soutaro commented Nov 27, 2023

Oh no, you want __END__ in RBS too? 😳

class Foo
end

__END__

class Foo      # Comment
end

Technically, it's possible. __END__ is not a valid identifier in RBS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants