lib/tapioca/dsl/compilers/protobuf.rb in tapioca-0.11.5 vs lib/tapioca/dsl/compilers/protobuf.rb in tapioca-0.11.6
- old
+ new
@@ -229,10 +229,11 @@
def field_of(descriptor)
if descriptor.label == :repeated
# Here we're going to check if the submsg_name is named according to
# how Google names map entries.
# https://github.com/protocolbuffers/protobuf/blob/f82e26/ruby/ext/google/protobuf_c/defs.c#L1963-L1966
- if descriptor.submsg_name.to_s.end_with?("_MapEntry_#{descriptor.name}")
+ if descriptor.submsg_name.to_s.end_with?("_MapEntry_#{descriptor.name}") ||
+ descriptor.submsg_name.to_s.end_with?("FieldsEntry")
key = descriptor.subtype.lookup("key")
value = descriptor.subtype.lookup("value")
key_type = type_of(key)
value_type = type_of(value)