rake.d/vendor/drake-0.9.2.0.3.1/lib/rake/ext/time.rb
raw| 1 | # ########################################################################### |
| 2 | # Extensions to time to allow comparisons with an early time class. |
| 3 | # |
| 4 | class Time |
| 5 | alias rake_original_time_compare :<=> |
| 6 | def <=>(other) |
| 7 | if Rake::EarlyTime === other |
| 8 | - other.<=>(self) |
| 9 | else |
| 10 | rake_original_time_compare(other) |
| 11 | end |
| 12 | end |
| 13 | end # class Time |
| 14 |