We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 737d3a8 + 4d8782a commit d05c0abCopy full SHA for d05c0ab
1 file changed
lib/rake/ext/time.rb
@@ -4,13 +4,15 @@
4
require 'rake/early_time'
5
require 'rake/late_time'
6
7
-class Time # :nodoc: all
8
- alias rake_original_time_compare :<=>
9
- def <=>(other)
10
- if Rake::EarlyTime === other || Rake::LateTime === other
11
- - other.<=>(self)
12
- else
13
- rake_original_time_compare(other)
+if RUBY_VERSION < "1.9"
+ class Time # :nodoc: all
+ alias rake_original_time_compare :<=>
+ def <=>(other)
+ if Rake::EarlyTime === other || Rake::LateTime === other
+ - other.<=>(self)
+ else
14
+ rake_original_time_compare(other)
15
+ end
16
end
17
18
0 commit comments