Permalink
Browse files

Merge pull request #3771 from kennyj/fix_rake_test_warnings

Call a block passed rake_tasks method in the self context
  • Loading branch information...
2 parents e7e046f + 7f8f554 commit 0b7cd7b570349104fd7ec4a214987de2386ddea1 @josevalim josevalim committed Nov 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/railtie.rb
@@ -181,7 +181,7 @@ def load_console(app=self)
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

0 comments on commit 0b7cd7b

Please sign in to comment.