lib/tapioca/compilers/symbol_table/symbol_generator.rb in tapioca-0.2.0 vs lib/tapioca/compilers/symbol_table/symbol_generator.rb in tapioca-0.2.1

- old
+ new

@@ -452,11 +452,11 @@ path_in_gem?(source_location) end sig { params(constant: Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: true) - files = get_file_candidates(constant) - files = Tapioca::ConstantLocator.files_for(constant) if files.empty? + files = Set.new(get_file_candidates(constant)) + .merge(Tapioca::ConstantLocator.files_for(constant)) return !strict if files.empty? files.any? do |file| path_in_gem?(file)