diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb index 28a64e1cb3..cf7bca9d51 100644 --- a/railties/lib/rails/code_statistics.rb +++ b/railties/lib/rails/code_statistics.rb @@ -35,7 +35,7 @@ class CodeStatistics #:nodoc: private def calculate_statistics - @pairs.transform_values { |dir| calculate_directory_statistics(dir) } + Hash[@pairs.map { |pair| [pair.first, calculate_directory_statistics(pair.last)] }] end def calculate_directory_statistics(directory, pattern = /^(?!\.).*?\.(rb|js|coffee|rake)$/)