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
Merged

Conversation

asterite
Copy link
Member

@asterite asterite 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
Copy link
Contributor

j8r commented Apr 9, 2019

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

@straight-shoota
Copy link
Member

@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
Copy link
Member Author

asterite commented Apr 9, 2019

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

@RX14 RX14 merged commit db9cb72 into crystal-lang:master Apr 25, 2019
@RX14 RX14 added this to the 0.29.0 milestone Apr 25, 2019
@RX14 RX14 added breaking-change kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib labels Apr 25, 2019
@olbat
Copy link
Contributor

olbat 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
Labels
breaking-change kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload large file Content-Length Int32 overflow
5 participants