antirez / lua-cmsgpack

A self contained Lua MessagePack C implementation.
355 stars 118 forks source link

@user_script:6: Bad data format in input. #51

Closed phlegx closed 8 years ago

phlegx commented 8 years ago

Hi! I use Redis v2.8.4 and Ruby redis-rb v3.2.2 gem as client. I get this error if I want to pack and unpack messages: @user_script:6: Bad data format in input.

Ruby msgpack v0.5.12

{ a: 'dc127424-e201-463c-9b41-f5b927ecd947' }.to_msgpack
=> "\x81\xA1a\xDA\x00$dc127424-e201-463c-9b41-f5b927ecd947" 

Ruby msgpack v0.7.2

{ a: 'dc127424-e201-463c-9b41-f5b927ecd947' }.to_msgpack
=> "\x81\xA1a\xD9$dc127424-e201-463c-9b41-f5b927ecd947" 

Here my Redis INFO output:

redis_version:2.8.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:a44a05d76f06a5d9
redis_mode:standalone
os:Linux 3.16.0-70-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.2
...

I have read this https://github.com/antirez/lua-cmsgpack/pull/44 and seen that Redis v2.8.4 uses lua-cmsgpack 0.4.0 where this problem is solved (https://github.com/antirez/lua-cmsgpack/commit/dec1810a70d2948725f2e32cc38163de62b9d9a7) but not in my case. Any idea?

phlegx commented 8 years ago

OK, Redis starting from version 2.8.18 uses lua-cmsgpack 0.4.0!