Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add support for Ruby < 1.9

  • Loading branch information...
commit ce8e1afba6574c1e2de651798c02be4e308c7dd6 1 parent cc83501
Daniel Hilgarth authored March 03, 2013

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  lib/jekyll/post.rb
4  lib/jekyll/post.rb
@@ -87,7 +87,9 @@ def read_yaml(base, name)
87 87
     #
88 88
     # Returns -1, 0, 1
89 89
     def <=>(other)
90  
-      cmp = self.date.to_date <=> other.date.to_date
  90
+      cmp = self.date.year <=> other.date.year
  91
+      cmp = self.date.month <=> other.date.month if cmp == 0
  92
+      cmp = self.date.day <=> other.date.day if cmp == 0
91 93
       if 0 == cmp
92 94
        cmp = self.slug <=> other.slug
93 95
       end

0 notes on commit ce8e1af

Please sign in to comment.
Something went wrong with that request. Please try again.