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

Buffer: also forward the to_s method #90

Merged
merged 1 commit into from
Dec 15, 2016

Conversation

mkauf
Copy link
Contributor

@mkauf mkauf commented Dec 13, 2016

Instead of actual data, the example program "client.rb" sent the string "#<HTTP2::Buffer:0x0056529cd1d1a8>" when I tried it. Probably this behavior depends on the Ruby version (I have tested with Ruby 2.3.1).

I don't know if there is a better bugfix, but also forwarding the "to_s" method fixes the problem.

@coveralls
Copy link

coveralls commented Dec 13, 2016

Coverage Status

Coverage remained the same at 96.898% when pulling 4c2216e on mkauf:buffer_bugfix into c11d93a on igrigorik:master.

@igrigorik
Copy link
Owner

Some context on to_s vs to_str (which we already implement): https://gist.github.com/kinopyo/5682347

@georgeu2000 WDYT? I'll defer to you on this one.

@georgeu2000
Copy link
Collaborator

@igrigorik Regarding context link:

You should not implement to_str unless your object acts like a string

It seems to me that a buffer does act like a string, so it should implement to_str.

LGTM. Merging.

@georgeu2000 georgeu2000 merged commit 66d7cab into igrigorik:master Dec 15, 2016
@mkauf mkauf deleted the buffer_bugfix branch December 15, 2016 19:20
@mkauf
Copy link
Contributor Author

mkauf commented Dec 15, 2016

Thank you for merging!

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

Successfully merging this pull request may close these issues.

None yet

4 participants