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

Accept Numeric by Integer#{upto,downto} #914

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

pocke
Copy link
Member

@pocke pocke commented Mar 4, 2022

Integer#{upto,downto} accept Float, Rational, and so on.
This PR allows them.

By the way, the type definitions will also accept Complex as the argument but actually it raises an error on Ruby level.
I think it is acceptable for now. They accept the same argument as Integer#< (ref) and currently Integer#< accepts Numeric on RBS level.

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

👏

@pocke pocke merged commit 8b50ae1 into ruby:master Mar 7, 2022
@pocke pocke deleted the Accept_Numeric_by_Integer__upto_downto_ branch March 7, 2022 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants