-
Notifications
You must be signed in to change notification settings - Fork 31
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
⚠️ Fixes for Ruby Warnings #62
The head ref may contain hidden characters: "\u26A0\uFE0F"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client.rb
is generated (it says so at the top), so please edit https://github.com/ruby-amqp/amq-protocol/blob/master/codegen/protocol.rb.pytemplate instead.
Thank you for looking into this! |
Ugh, why did I miss the comment at the top of the file I was editing... |
Now |
I did run Besides that, I see a chunk of diff like this in the generated code: diff --git a/lib/amq/protocol/client.rb b/lib/amq/protocol/client.rb
index 85dafb7..60a1c51 100644
--- a/lib/amq/protocol/client.rb
+++ b/lib/amq/protocol/client.rb
@@ -1437,8 +1437,7 @@ module AMQ
result = [60, 0].pack(PACK_UINT16_X2)
result += AMQ::Pack.pack_uint64_big_endian(body_size)
result += [flags].pack(PACK_UINT16)
- pieces_joined = pieces.join(EMPTY_STRING)
- result.force_encoding(pieces_joined.encoding) + pieces_joined
+ result + pieces.join(EMPTY_STRING)
end
# THIS DECODES ONLY FLAGS I didn't include that in this PR because this reproduces when I run the generator in master, so I'm sure this is unrelated to my changes here. |
OK, I will take a look. Thank you. |
@amatsuda thank you. Indeed the fix in #56 wasn't properly applied to the A minor comment on the branch name if I may. It's certainly witty to use a single warning sign emoji in a branch that fixes warnings but it was a bit frustrating to work with in the terminal. I will release a |
@michaelklishin Thank you! And I'm so sorry about the branch name... |
## Changes between 2.0.0 and 2.1.0 ### Ruby Warnings Squashed Contributed by Akira Matsuda. GitHub issue: [#62](ruby-amqp/amq-protocol#62) ### Byte Array Decoding Byte array values in types now can be decoded (to the extent Ruby type system permits) by this library. GitHub issue: [#58](ruby-amqp/amq-protocol#58)
Here are fixes for some Ruby warnings with the 2.0.1 gem.