summaryrefslogtreecommitdiff
path: root/ruby_2_2/lib/rake/ext/core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_2_2/lib/rake/ext/core.rb')
-rw-r--r--ruby_2_2/lib/rake/ext/core.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/ruby_2_2/lib/rake/ext/core.rb b/ruby_2_2/lib/rake/ext/core.rb
deleted file mode 100644
index 7575df15a9..0000000000
--- a/ruby_2_2/lib/rake/ext/core.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-class Module
- # Check for an existing method in the current class before extending. If
- # the method already exists, then a warning is printed and the extension is
- # not added. Otherwise the block is yielded and any definitions in the
- # block will take effect.
- #
- # Usage:
- #
- # class String
- # rake_extension("xyz") do
- # def xyz
- # ...
- # end
- # end
- # end
- #
- def rake_extension(method) # :nodoc:
- if method_defined?(method)
- $stderr.puts "WARNING: Possible conflict with Rake extension: " +
- "#{self}##{method} already exists"
- else
- yield
- end
- end
-end