diff --git a/lib/cocina/models/validators/dark_validator.rb b/lib/cocina/models/validators/dark_validator.rb index a570221a..bb8c92ac 100644 --- a/lib/cocina/models/validators/dark_validator.rb +++ b/lib/cocina/models/validators/dark_validator.rb @@ -39,12 +39,7 @@ def dro? end def invalid_files - @invalid_files ||= - [].tap do |invalid_files| - files.each do |file| - invalid_files << file if invalid?(file) - end - end + @invalid_files ||= files.select { |file| invalid?(file) } end def invalid_filenames