lib/nanoc/data_sources/filesystem.rb in nanoc-4.6.1 vs lib/nanoc/data_sources/filesystem.rb in nanoc-4.6.2
- old
+ new
@@ -252,10 +252,10 @@
all = {}
by_basename.each_pair do |basename, filenames|
# Divide
meta_filenames = filenames.select { |fn| ext_of(fn) == '.yaml' }
- content_filenames = filenames.select { |fn| ext_of(fn) != '.yaml' }
+ content_filenames = filenames.reject { |fn| ext_of(fn) == '.yaml' }
# Check number of files per type
unless [0, 1].include?(meta_filenames.size)
raise Errors::MultipleMetaFiles.new(meta_filenames, basename)
end