From f4fb833d343d1f1409f1ff0822f6f869229d13a9 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Sat, 26 Jun 2010 23:03:16 -0700 Subject: [PATCH] The site configuration may not always provide a 'time' setting. Closes #184. * This fixes a bug on Ruby 1.9.1 and 1.9.2 where Time.parse was being passed an emptry String, if the 'time' setting was not defined. --- History.txt | 1 + lib/jekyll/site.rb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.txt b/History.txt index f0de13dd..ae51e1ef 100644 --- a/History.txt +++ b/History.txt @@ -1,6 +1,7 @@ == HEAD * Bug Fixes * Highlight should not be able to render local files + * The site configuration may not always provide a 'time' setting (#184) == 0.6.2 / 2010-06-25 * Bug Fixes diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 7570cb0b..d158e33b 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -28,7 +28,11 @@ module Jekyll end def reset - self.time = Time.parse(self.config['time'].to_s) || Time.now + self.time = if self.config['time'] + Time.parse(self.config['time'].to_s) + else + Time.now + end self.layouts = {} self.posts = [] self.pages = []