-
Notifications
You must be signed in to change notification settings - Fork 118
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
Compatibility mode #68
Conversation
When passing `compatibility_mode: true` to MessagePack.pack or `MessagePack::Packer.new` the encoder uses the old MessagePack spec and avoids the bin and str8 types.
When passing `compatibility_mode: true` to MessagePack.pack or `MessagePack::Packer.new` the encoder uses the old MessagePack spec and avoids the bin and str8 types.
These tests should probably be used for the MRI implementation too.
How about |
I must say I don't see any benefit in using the shorter form "compat" over "compatibility mode". I was thinking of something that describes it better, that explains what is it compatible with. I want to express "backwards compatible" and "don't use new features" and "raw not bin or str8". |
We don't have appropriate name for what it is compatible with... |
Merged to master. |
👍 |
That's great, thanks for the review and the cruby code. |
This adds an option to
MessagePack.pack
andMessagePack::Packer.new
that makes the packer work in what the MessagePack specification calls "compatibility mode" – it disables the bin and str8 types.This should solve #67.
Please note that I know next to nothing about writing Ruby C extensions. Someone, perhaps @tagomoris, should look at that and give me hints to how to do it properly.
I'm not super happy about calling the option
:compatibility_mode
, so if there are any other suggestions I would be happy to change it.