aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/railtie.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-11-27 11:25:07 -0800
committerJosé Valim <jose.valim@gmail.com>2011-11-27 11:25:07 -0800
commit0b7cd7b570349104fd7ec4a214987de2386ddea1 (patch)
treeda118ceca1347bcd30b6dccf3759731fd605dc2d /railties/lib/rails/railtie.rb
parente7e046fa1ca66a3f6edf0731ca64d6529a749790 (diff)
parent7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16 (diff)
downloadrails-0b7cd7b570349104fd7ec4a214987de2386ddea1.tar.gz
rails-0b7cd7b570349104fd7ec4a214987de2386ddea1.tar.bz2
rails-0b7cd7b570349104fd7ec4a214987de2386ddea1.zip
Merge pull request #3771 from kennyj/fix_rake_test_warnings
Call a block passed rake_tasks method in the self context
Diffstat (limited to 'railties/lib/rails/railtie.rb')
-rw-r--r--railties/lib/rails/railtie.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index f0991b99af..07a122e7d0 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -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