10000 Fix Float#truncate signature. by necrodome · Pull Request #988 · sorbet/sorbet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix Float#truncate signature. #988

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

Merged
merged 1 commit into from
Jun 22, 2019
Merged

Fix Float#truncate signature. #988

merged 1 commit into from
Jun 22, 2019

Conversation

necrodome
Copy link
Contributor

Float#truncate can get an Integer as an argument and return Integer or Float
depending on the arg value.

@necrodome necrodome requested a review from a team June 21, 2019 21:21
@ghost ghost requested review from DarkDimius and removed request for a team June 21, 2019 21:21
Copy link
Collaborator
@DarkDimius DarkDimius left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution, indeed, the current signature is wrong!
While your suggestion makes it better, it can break existing code that uses the "simple" version of it.
Comment above proposes how to keep best of both!

It can get an (optional) Integer as an argument and return Integer or Float
depending on the arg value.
@necrodome
Copy link
Contributor Author

Amended the previous commit to include the original signature.

@DarkDimius
Copy link
Collaborator

Thank you! Looks great!
I've kicked off the CI, we'll merge when it passes!

@ptarjan ptarjan merged commit 732613a into sorbet:master Jun 22, 2019
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.

4 participants
0