diff options
Diffstat (limited to 'lib/rake/ext/time.rb')
-rw-r--r-- | lib/rake/ext/time.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rake/ext/time.rb b/lib/rake/ext/time.rb index c058649b7e..d3b8cf9dc1 100644 --- a/lib/rake/ext/time.rb +++ b/lib/rake/ext/time.rb @@ -1,12 +1,13 @@ #-- -# Extensions to time to allow comparisons with an early time class. +# Extensions to time to allow comparisons with early and late time classes. require 'rake/early_time' +require 'rake/late_time' class Time # :nodoc: all alias rake_original_time_compare :<=> def <=>(other) - if Rake::EarlyTime === other + if Rake::EarlyTime === other || Rake::LateTime === other - other.<=>(self) else rake_original_time_compare(other) |