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

add copy overload to IO to copy at most *limit* bytes #1639

Closed
wants to merge 1 commit into from

Conversation

repomaa
Copy link
Contributor

@repomaa repomaa commented Sep 29, 2015

No description provided.

@repomaa repomaa force-pushed the copy-with-limit branch 3 times, most recently from 5fdfa70 to 3ec820b Compare September 29, 2015 17:37
@asterite
Copy link
Member

This is useful, and Ruby also has this. Give us some time to review it with @waj, and also check #1641, and we'll probably merge it.

@asterite
Copy link
Member

asterite commented Jun 2, 2016

@jreinert Do you want to rebase this? Then we'll merge it.

@repomaa
Copy link
Contributor Author

repomaa commented Jun 9, 2016

@asterite done!

@repomaa repomaa force-pushed the copy-with-limit branch from 9364aa9 to 08ab281 Compare June 9, 2016 23:05
# io2.to_s #=> "hel"
# ```
def self.copy(src, dst, limit)
buffer :: UInt8[1024]
Copy link
Member

Choose a reason for hiding this comment

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

@jreinert This should be buffer = uninitialized UInt8[1024]

@miketheman
Copy link
Contributor

#triage
@jreinert It seems like there's a need for a syntax update, as pointed out by @asterite .
A rebase against master is always a good idea, as this will trigger the most current CI build/test suite.

@repomaa
Copy link
Contributor Author

repomaa commented Jun 18, 2016

all done

@miketheman
Copy link
Contributor

@jreinert Thanks for the rebase. As you can see, the build fails on undefined constant StringIO.

In crystal 0.9.0, StringIO was renamed to MemoryIO - could you please rename the specs and docs?

@asterite asterite added this to the 0.18.5 milestone Jun 23, 2016
@asterite
Copy link
Member

Merged in 5fa22e6 . Thank you!

@asterite asterite closed this Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants