lib/tapioca/dsl/compilers/protobuf.rb in tapioca-0.15.1 vs lib/tapioca/dsl/compilers/protobuf.rb in tapioca-0.16.0

- old
+ new

@@ -157,12 +157,10 @@ sig { override.returns(T::Enumerable[Module]) } def gather_constants marker = Google::Protobuf::MessageExts::ClassMethods - enum_modules = ObjectSpace.each_object(Google::Protobuf::EnumDescriptor).map do |desc| - T.cast(desc, Google::Protobuf::EnumDescriptor).enummodule - end + enum_modules = ObjectSpace.each_object(Google::Protobuf::EnumDescriptor).map(&:enummodule) results = if Google::Protobuf.const_defined?(:AbstractMessage) abstract_message_const = ::Google::Protobuf.const_get(:AbstractMessage) descendants_of(abstract_message_const) - [abstract_message_const] else