mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Auto-correct Style/RedundantBegin
cop offences
It is newly added at 7b6b10542d
.
```
% be rubocop -a
Inspecting 2781 files
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:13: C: [Corrected] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:13:11: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
Rails.autoloaders.main.reload
^^^^
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
2781 files inspected, 6 offenses detected, 6 offenses corrected
```
This commit is contained in:
parent
936603f62a
commit
b031d42a3a
1 changed files with 3 additions and 5 deletions
|
@ -9,11 +9,9 @@ module ActiveSupport
|
|||
module Decorations
|
||||
def clear
|
||||
Dependencies.unload_interlock do
|
||||
begin
|
||||
Rails.autoloaders.main.reload
|
||||
rescue Zeitwerk::ReloadingDisabledError
|
||||
raise "reloading is disabled because config.cache_classes is true"
|
||||
end
|
||||
Rails.autoloaders.main.reload
|
||||
rescue Zeitwerk::ReloadingDisabledError
|
||||
raise "reloading is disabled because config.cache_classes is true"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue