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.
This commit is contained in:
Postmodern 2010-06-26 23:03:16 -07:00 committed by Tom Preston-Werner
parent d9bc00c804
commit f4fb833d34
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
== HEAD == HEAD
* Bug Fixes * Bug Fixes
* Highlight should not be able to render local files * 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 == 0.6.2 / 2010-06-25
* Bug Fixes * Bug Fixes

View File

@ -28,7 +28,11 @@ module Jekyll
end end
def reset 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.layouts = {}
self.posts = [] self.posts = []
self.pages = [] self.pages = []