lib/tapioca/runtime/dynamic_mixin_compiler.rb in tapioca-0.9.4 vs lib/tapioca/runtime/dynamic_mixin_compiler.rb in tapioca-0.10.0

- old
+ new

@@ -176,19 +176,19 @@ tree << RBI::Include.new("GeneratedInstanceMethods") end sig { params(tree: RBI::Tree).returns([T::Array[Module], T::Array[Module]]) } def compile_mixes_in_class_methods(tree) - includes = dynamic_includes.map do |mod| + includes = dynamic_includes.filter_map do |mod| qname = qualified_name_of(mod) next if qname.nil? || qname.empty? next if filtered_mixin?(qname) tree << RBI::Include.new(qname) mod - end.compact + end # If we can generate multiple mixes_in_class_methods, then we want to use all dynamic extends that are not the # constant itself mixed_in_class_methods = dynamic_extends.select do |mod| mod != @constant && !module_included_by_another_dynamic_extend?(mod, dynamic_extends)