aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorPablo Vizcay <pablo.vizcay@gmail.com>2015-04-09 04:48:01 -0300
committerPablo Vizcay <pablo.vizcay@gmail.com>2015-04-09 04:48:01 -0300
commit6c5a53e9ca4a81c40fbf7ebe2c63663ac9eb4f6d (patch)
tree3af9d9855dc3f7b3b485a8a0340af9f3f95e6fa5 /railties/lib
parent8c8e9b34d576d2b223345d9073aca28c7975ecd7 (diff)
downloadrails-6c5a53e9ca4a81c40fbf7ebe2c63663ac9eb4f6d.tar.gz
rails-6c5a53e9ca4a81c40fbf7ebe2c63663ac9eb4f6d.tar.bz2
rails-6c5a53e9ca4a81c40fbf7ebe2c63663ac9eb4f6d.zip
bugfix CodeStatics#calculate_directory_statics when dir has source extension
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/code_statistics.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb
index 583d005d46..fd352dc9b7 100644
--- a/railties/lib/rails/code_statistics.rb
+++ b/railties/lib/rails/code_statistics.rb
@@ -41,11 +41,9 @@ class CodeStatistics #:nodoc:
if File.directory?(path) && (/^\./ !~ file_name)
stats.add(calculate_directory_statistics(path, pattern))
+ elsif file_name =~ pattern
+ stats.add_by_file_path(path)
end
-
- next unless file_name =~ pattern
-
- stats.add_by_file_path(path)
end
stats