diff options
author | Vinicius Stock <vinicius.stock@outlook.com> | 2018-12-10 19:22:56 -0200 |
---|---|---|
committer | Vinicius Stock <vinicius.stock@outlook.com> | 2018-12-10 19:22:56 -0200 |
commit | 3b7a4d3d75329d499d817c3fbeb75caefe9691ce (patch) | |
tree | 4d2f3b436604296dbc389c592c5388d512628609 /activesupport/lib/active_support/descendants_tracker.rb | |
parent | cf71f31e2e152eceeb311aea6eadba3f2a814d81 (diff) | |
download | rails-3b7a4d3d75329d499d817c3fbeb75caefe9691ce.tar.gz rails-3b7a4d3d75329d499d817c3fbeb75caefe9691ce.tar.bz2 rails-3b7a4d3d75329d499d817c3fbeb75caefe9691ce.zip |
Upgrade Rubocop to 0.61.1 and fix offenses
Diffstat (limited to 'activesupport/lib/active_support/descendants_tracker.rb')
-rw-r--r-- | activesupport/lib/active_support/descendants_tracker.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/descendants_tracker.rb b/activesupport/lib/active_support/descendants_tracker.rb index a4cee788b6..05236d3162 100644 --- a/activesupport/lib/active_support/descendants_tracker.rb +++ b/activesupport/lib/active_support/descendants_tracker.rb @@ -38,12 +38,13 @@ module ActiveSupport end private - def accumulate_descendants(klass, acc) - if direct_descendants = @@direct_descendants[klass] - acc.concat(direct_descendants) - direct_descendants.each { |direct_descendant| accumulate_descendants(direct_descendant, acc) } + + def accumulate_descendants(klass, acc) + if direct_descendants = @@direct_descendants[klass] + acc.concat(direct_descendants) + direct_descendants.each { |direct_descendant| accumulate_descendants(direct_descendant, acc) } + end end - end end def inherited(base) |