mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Add support for Ruby < 1.9
This commit is contained in:
@@ -87,7 +87,9 @@ module Jekyll
|
||||
#
|
||||
# Returns -1, 0, 1
|
||||
def <=>(other)
|
||||
cmp = self.date.to_date <=> other.date.to_date
|
||||
cmp = self.date.year <=> other.date.year
|
||||
cmp = self.date.month <=> other.date.month if cmp == 0
|
||||
cmp = self.date.day <=> other.date.day if cmp == 0
|
||||
if 0 == cmp
|
||||
cmp = self.slug <=> other.slug
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user