Modifying enumerator for 1.8.7

This commit is contained in:
Persa Zula 2013-12-05 23:09:30 -07:00 committed by Parker Moore
parent e69d77b4df
commit 6a13f7dd57
1 changed files with 2 additions and 2 deletions

View File

@ -193,8 +193,8 @@ module Jekyll
end
def read_things(dir, magic_dir, klass)
get_entries(dir, magic_dir).each_with_object([]) do |entry, things|
things << klass.new(self, self.source, dir, entry) if klass.valid?(entry)
things = get_entries(dir, magic_dir).map do |entry|
klass.new(self, self.source, dir, entry) if klass.valid?(entry)
end
end