THRIFT-1331. rb: Ruby library deserializes an empty map to nil
This patch properly detects when the metadata is omitted in Compact Protocol messages.
Patch: Armaan Sarkar
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1173300 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift
index 23d5d97..b8b89b7 100644
--- a/test/DebugProtoTest.thrift
+++ b/test/DebugProtoTest.thrift
@@ -161,6 +161,10 @@
49: map<byte, list<byte>> byte_list_map;
}
+// To be used to test the serialization of an empty map
+struct SingleMapTestStruct {
+ 1: required map<i32, i32> i32_map;
+}
const CompactProtoTestStruct COMPACT_TEST = {
'a_byte' : 127,