summaryrefslogtreecommitdiff
path: root/lib/rake/ext
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rake/ext')
-rw-r--r--lib/rake/ext/module.rb2
-rw-r--r--lib/rake/ext/string.rb3
-rw-r--r--lib/rake/ext/time.rb3
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/rake/ext/module.rb b/lib/rake/ext/module.rb
index 3f64aef6c8..fc61bea555 100644
--- a/lib/rake/ext/module.rb
+++ b/lib/rake/ext/module.rb
@@ -36,4 +36,4 @@ class Module
rake_original_const_missing(const_name)
end
end
-end
+end unless defined? Rake::REDUCE_COMPAT
diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb
index fb22a9deb1..be8b463e1a 100644
--- a/lib/rake/ext/string.rb
+++ b/lib/rake/ext/string.rb
@@ -4,6 +4,7 @@ require 'rake/ext/core'
# Rake extension methods for String.
#
class String
+
rake_extension("ext") do
# Replace the file extension with +newext+. If there is no extension on
# the string, append the new extension to the end. If the new extension
@@ -163,5 +164,5 @@ class String
result
end
end
-end # class String
+end
diff --git a/lib/rake/ext/time.rb b/lib/rake/ext/time.rb
index 7877abf0ce..ea8b037e39 100644
--- a/lib/rake/ext/time.rb
+++ b/lib/rake/ext/time.rb
@@ -1,6 +1,8 @@
#--
# Extensions to time to allow comparisons with an early time class.
+require 'rake/early_time'
+
class Time
alias rake_original_time_compare :<=>
def <=>(other)
@@ -11,4 +13,3 @@ class Time
end
end
end
-