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

ARGF Check if read_count is zero #8177

Merged
merged 1 commit into from
Sep 13, 2019
Merged

Conversation

Blacksmoke16
Copy link
Member

Fixes #8136

\cc @asterite Not too sure about the what the bug was, so I kinda just guessed on the it block text. So I can update it to some more accurate if its totally wrong, or if there's a better way to handle the spec?

@asterite
Copy link
Member

Thank you! The spec is too big, it doesn't actually need to read from a file. You just need an IO that doesn't return all of the Slice that you ask it. I'll send a PR later if I have time.

@asterite
Copy link
Member

Actually this is fine, I thought there was a better way to mock argf.

I don't agree with .zero? instead of == 0, but let's merge this.

Thank you!

@asterite asterite merged commit 2167a9d into crystal-lang:master Sep 13, 2019
@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:files labels Sep 13, 2019
@asterite asterite added this to the 0.31.0 milestone Sep 13, 2019
@Blacksmoke16 Blacksmoke16 deleted the argf-fix branch September 13, 2019 11:54
dnamsons pushed a commit to dnamsons/crystal that referenced this pull request Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XML::Reader error reading from ARGF
2 participants