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

Let IO#copy return UInt64 #7660

Merged
merged 1 commit into from Apr 25, 2019

Conversation

@asterite
Copy link
Member

commented Apr 9, 2019

Fixes #7659

IO.copy shouldn't overflow. Plus the return value isn't normally used. But when it is, it's better if it has the correct value, accounting for large uploads/copies.

@j8r

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2019

Unrelated thing: it can be a instance methods, and add the annotation dst : IO?

@straight-shoota

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

@j8r An instance method would be weird. Does it copy the receiver to the argument or is it the other way around? We'd need to go with #copy_to or #copy_from. But IO.copy(from, to) reads very nice and is self-exlpanatory.

@asterite

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

We could actually have copy_to and copy_from but it's a separate discussion

@RX14

RX14 approved these changes Apr 25, 2019

@RX14 RX14 merged commit db9cb72 into crystal-lang:master Apr 25, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RX14 RX14 added this to the 0.29.0 milestone Apr 25, 2019

@olbat

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

Does this PR fixes #3209 as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.