From 4b108df3ab99c9637d881a0b50027e5a4d5ad27f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 10 Apr 2015 17:05:42 -0400 Subject: [PATCH] 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. --- lib/jekyll/convertible.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index d587f8f3..2186d95c 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -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.