convertible: abort with an error if Page/Post#data isn't a hash.

when the default_proc was being assigned, it failed if it wasn't a Hash. We
expect data to be a Hash everywhere, so let's freak out if it isn't after
reading and applying the fallback.

Fixes #3643.
This commit is contained in:
Parker Moore 2015-04-10 17:05:42 -04:00
parent 279fb6af11
commit 4b108df3ab
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ module Jekyll
end
self.data ||= {}
unless self.data.is_a?(Hash)
Jekyll.logger.abort_with "Fatal:", "Invalid YAML front matter in #{File.join(base, name)}"
end
end
# Transform the contents based on the content type.