2 parents 8c429cd + 512b587 commit 663c3a3Copy full SHA for 663c3a3
2 files changed
ext/msgpack/unpacker.c
@@ -911,8 +911,8 @@ int msgpack_unpacker_skip_nil(msgpack_unpacker_t* uk)
911
return b;
912
}
913
if(b == 0xc0) {
914
+ reset_head_byte(uk);
915
return 1;
916
917
return 0;
918
-
spec/cruby/unpacker_spec.rb
@@ -11,8 +11,9 @@
11
end
12
13
it 'skip_nil succeeds' do
14
- unpacker.feed("\xc0")
+ unpacker.feed("\xc0*")
15
unpacker.skip_nil.should == true
16
+ unpacker.unpack.should == 42
17
18
19
it 'skip_nil fails' do
0 commit comments