diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-27 11:25:07 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-27 11:25:07 -0800 |
commit | 0b7cd7b570349104fd7ec4a214987de2386ddea1 (patch) | |
tree | da118ceca1347bcd30b6dccf3759731fd605dc2d /railties/lib/rails/railtie.rb | |
parent | e7e046fa1ca66a3f6edf0731ca64d6529a749790 (diff) | |
parent | 7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16 (diff) | |
download | rails-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.rb | 2 |
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 |