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

strange behavior from IOBuffer #502

Closed
ExpandingMan opened this issue Feb 26, 2018 · 3 comments
Closed

strange behavior from IOBuffer #502

ExpandingMan opened this issue Feb 26, 2018 · 3 comments

Comments

@ExpandingMan
Copy link

ExpandingMan commented Feb 26, 2018

The Compat version of IOBuffer does not seem to be working properly on 0.6. If I do

b = IOBuffer(zeros(UInt8, 4), write=true)
write(b, 'a')

take!(b)

On the last line on 0.7 I get simply [0x61] (expected behavior). On 0.6 however I get the entire buffer: [0x61,0x00,0x00,0x00].

The problem is even worse if you do IOBuffer(maxsize=4, write=true) in which case in 0.6 all the values of an uninitialized array are returned.

Perhaps this line is calling the wrong function?

@stevengj
Copy link
Member

I think #501 is buggy, as I mentioned at the end of that PR...

@stevengj
Copy link
Member

I'm preparing a PR to fix IOBuffer, including this issue.

@ExpandingMan
Copy link
Author

This was resolved by #504.

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

No branches or pull requests

2 participants