Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/msgpack/unpacker.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,8 @@ int msgpack_unpacker_skip_nil(msgpack_unpacker_t* uk)
return b;
}
if(b == 0xc0) {
reset_head_byte(uk);
return 1;
}
return 0;
}

3 changes: 2 additions & 1 deletion spec/cruby/unpacker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
end

it 'skip_nil succeeds' do
unpacker.feed("\xc0")
unpacker.feed("\xc0*")
unpacker.skip_nil.should == true
unpacker.unpack.should == 42
end

it 'skip_nil fails' do
Expand Down
Loading