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

ruby27: Add beginless ranges support #3260

Merged
merged 2 commits into from
Jul 20, 2020
Merged

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Jul 6, 2020

Motivation

Add support for begin-less ranges as described here:

g = (..1)
T.reveal_type(g) # error: Revealed type: `T::Range[Integer(1)]`

h = Range.new(nil, 1)
T.reveal_type(h) # error: Revealed type: `T::Range[Integer(1)]`

This commit tracks upstream commit ruby/ruby@95f7992.

Test plan

See included automated tests.

@Morriar Morriar requested a review from a team as a code owner July 6, 2020 16:15
@Morriar Morriar requested review from DarkDimius and removed request for a team July 6, 2020 16:15
This commit tracks upstream commit ruby/ruby@95f7992.

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Copy link
Contributor

@elliottt elliottt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@elliottt elliottt merged commit e95024a into sorbet:master Jul 20, 2020
@Morriar Morriar deleted the at-ruby27-ranges branch July 20, 2020 16:28
elliottt added a commit that referenced this pull request Jul 20, 2020
elliottt added a commit that referenced this pull request Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants