diff options
author | Matthew Draper <matthew@trebex.net> | 2016-04-07 03:30:03 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-04-07 03:30:03 +0930 |
commit | 1c3afbab779f052a3fc6d5e2747874b3347d58cf (patch) | |
tree | ba078fa6f8d0ecf3b5c520ae4b269e53fe5a5545 /activesupport/lib/active_support/reloader.rb | |
parent | c908a902b3c3d4bdf3d18dcf83570277c706bd35 (diff) | |
parent | 291a098c111ff419506094e14c0186389b0020ca (diff) | |
download | rails-1c3afbab779f052a3fc6d5e2747874b3347d58cf.tar.gz rails-1c3afbab779f052a3fc6d5e2747874b3347d58cf.tar.bz2 rails-1c3afbab779f052a3fc6d5e2747874b3347d58cf.zip |
Merge pull request #24422 from matthewd/extinguish-executor-exceptions
Clean up after a failure in a run callback
Diffstat (limited to 'activesupport/lib/active_support/reloader.rb')
-rw-r--r-- | activesupport/lib/active_support/reloader.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/reloader.rb b/activesupport/lib/active_support/reloader.rb index 5d1f0e1e66..5623bdd349 100644 --- a/activesupport/lib/active_support/reloader.rb +++ b/activesupport/lib/active_support/reloader.rb @@ -43,7 +43,13 @@ module ActiveSupport # Initiate a manual reload def self.reload! executor.wrap do - new.tap(&:run!).complete! + new.tap do |instance| + begin + instance.run! + ensure + instance.complete! + end + end end prepare! end |