Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In #39137, a new `Rake::Application` instance was created per Rake command invocation. To ensure that the Rails tasks were defined for each `Rake::Application`, `rails/tasks.rb` was loaded per instance. However, `Rake::Application#load_rakefile` loads the application's Rakefile, which should invoke `Rails.application.load_tasks`, which, in turn, also loads the Rails tasks. When a Rake task is defined more than once, all definition blocks are executed when the task is run. Hence, Rails task blocks were being executed twice. This commit removes the unnecessary load and avoids double execution. Fixes #40136.
- Loading branch information