1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #3771 from kennyj/fix_rake_test_warnings

Call a block passed rake_tasks method in the self context
This commit is contained in:
José Valim 2011-11-27 11:25:07 -08:00
commit 0b7cd7b570

View file

@ -181,7 +181,7 @@ module Rails
def load_tasks(app=self)
extend Rake::DSL if defined? Rake::DSL
self.class.rake_tasks.each { |block| block.call(app) }
self.class.rake_tasks.each { |block| self.instance_exec(app, &block) }
# load also tasks from all superclasses
klass = self.class.superclass