Skip to content

Commit 21c4b09

Browse files
committed
Don't shadow outer local variables
1 parent ba8d89c commit 21c4b09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

activesupport/lib/active_support/descendants_tracker.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def self.direct_descendants(klass)
1111
end
1212

1313
def self.descendants(klass)
14-
@@direct_descendants[klass].inject([]) do |descendants, klass|
15-
descendants << klass
16-
descendants.concat klass.descendants
14+
@@direct_descendants[klass].inject([]) do |descendants, _klass|
15+
descendants << _klass
16+
descendants.concat _klass.descendants
1717
end
1818
end
1919

@@ -40,4 +40,4 @@ def descendants
4040
DescendantsTracker.descendants(self)
4141
end
4242
end
43-
end
43+
end

0 commit comments

Comments
 (0)