summaryrefslogtreecommitdiff
path: root/lib/rake/dsl_definition.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rake/dsl_definition.rb')
-rw-r--r--lib/rake/dsl_definition.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb
index 3294f9e6c0..6d9a6b88f3 100644
--- a/lib/rake/dsl_definition.rb
+++ b/lib/rake/dsl_definition.rb
@@ -144,10 +144,12 @@ module Rake
Rake.application.add_import(fn)
end
end
+
end
+ DeprecatedCommands = Object.new.extend(DSL)
+
module DeprecatedObjectDSL # :nodoc:
- Commands = Object.new.extend DSL
DSL.private_instance_methods(false).each do |name|
line = __LINE__+1
class_eval %{
@@ -160,8 +162,8 @@ module Rake
end
$stderr.puts "WARNING: DSL method \#{self.class}##{name} called at \#{caller.first}"
end
- Rake::DeprecatedObjectDSL::Commands.send(:#{name}, *args, &block)
- end
+ Rake::DeprecatedCommands.send(:#{name}, *args, &block)
+ end
private :#{name}
}, __FILE__, line
end