summaryrefslogtreecommitdiff
path: root/lib/rake/ext
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-11 21:35:01 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-11 21:35:01 +0000
commit9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d (patch)
tree73280968d3426b31c5d0b9da1d3e558aa6f9fcb9 /lib/rake/ext
parent52c1331763d8b9b8d6362987e6f8847b65ed7f57 (diff)
* NEWS (with all sufficient information):
* lib/rake: Update to rake 10.1.0 * bin/rake: ditto. * test/rake: ditto. * NEWS: Update NEWS to include rake 10.1.0 and links to release notes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/ext')
-rw-r--r--lib/rake/ext/core.rb3
-rw-r--r--lib/rake/ext/module.rb39
-rw-r--r--lib/rake/ext/string.rb4
3 files changed, 3 insertions, 43 deletions
diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb
index 1f3a738..c924c7e 100644
--- a/lib/rake/ext/core.rb
+++ b/lib/rake/ext/core.rb
@@ -19,7 +19,8 @@ class Module
#
def rake_extension(method)
if method_defined?(method)
- $stderr.puts "WARNING: Possible conflict with Rake extension: #{self}##{method} already exists"
+ $stderr.puts "WARNING: Possible conflict with Rake extension: " +
+ "#{self}##{method} already exists"
else
yield
end
diff --git a/lib/rake/ext/module.rb b/lib/rake/ext/module.rb
index fc61bea..e69de29 100644
--- a/lib/rake/ext/module.rb
+++ b/lib/rake/ext/module.rb
@@ -1,39 +0,0 @@
-require 'rake/ext/core'
-require 'rake/task'
-require 'rake/file_task'
-require 'rake/file_creation_task'
-require 'rake/application'
-require 'rake/task_manager'
-
-######################################################################
-# Rake extensions to Module.
-#
-class Module
-
- # Rename the original handler to make it available.
- alias :rake_original_const_missing :const_missing
-
- # Check for deprecated uses of top level (i.e. in Object) uses of
- # Rake class names. If someone tries to reference the constant
- # name, display a warning and return the proper object. Using the
- # --classic-namespace command line option will define these
- # constants in Object and avoid this handler.
- def const_missing(const_name)
- case const_name
- when :Task
- Rake.application.const_warning(const_name)
- Rake::Task
- when :FileTask
- Rake.application.const_warning(const_name)
- Rake::FileTask
- when :FileCreationTask
- Rake.application.const_warning(const_name)
- Rake::FileCreationTask
- when :RakeApp
- Rake.application.const_warning(const_name)
- Rake::Application
- else
- rake_original_const_missing(const_name)
- end
- end
-end unless defined? Rake::REDUCE_COMPAT
diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb
index be8b463..07ef167 100644
--- a/lib/rake/ext/string.rb
+++ b/lib/rake/ext/string.rb
@@ -13,9 +13,7 @@ class String
# +ext+ is a user added method for the String class.
def ext(newext='')
return self.dup if ['.', '..'].include? self
- if newext != ''
- newext = (newext =~ /^\./) ? newext : ("." + newext)
- end
+ newext = (newext =~ /^\./) ? newext : ("." + newext) if newext != ''
self.chomp(File.extname(self)) << newext
end
end