aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/source_annotation_extractor.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-03-09 10:04:57 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2014-03-09 10:04:57 +0000
commitec23277124b2f602bed1772926e687556de15176 (patch)
treef30c895b87e4c43ddb970011d25a22d3fb708667 /railties/lib/rails/source_annotation_extractor.rb
parent45efd0ebf77811e43cebc68400c24652133a0f99 (diff)
parentcff340f1eda96be952437abeed80591a85ef0194 (diff)
downloadrails-ec23277124b2f602bed1772926e687556de15176.tar.gz
rails-ec23277124b2f602bed1772926e687556de15176.tar.bz2
rails-ec23277124b2f602bed1772926e687556de15176.zip
Merge pull request #14262 from sferik/flat_map
Replace additional instances of map.flatten with flat_map
Diffstat (limited to 'railties/lib/rails/source_annotation_extractor.rb')
-rw-r--r--railties/lib/rails/source_annotation_extractor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/source_annotation_extractor.rb b/railties/lib/rails/source_annotation_extractor.rb
index 3cf6a005ea..83e28090f8 100644
--- a/railties/lib/rails/source_annotation_extractor.rb
+++ b/railties/lib/rails/source_annotation_extractor.rb
@@ -115,7 +115,7 @@ class SourceAnnotationExtractor
# Prints the mapping from filenames to annotations in +results+ ordered by filename.
# The +options+ hash is passed to each annotation's +to_s+.
def display(results, options={})
- options[:indent] = results.map { |f, a| a.map(&:line) }.flatten.max.to_s.size
+ options[:indent] = results.flat_map { |f, a| a.map(&:line) }.max.to_s.size
results.keys.sort.each do |file|
puts "#{file}:"
results[file].each do |note|