diff options
author | Pablo Vizcay <pablo.vizcay@gmail.com> | 2015-04-09 04:48:01 -0300 |
---|---|---|
committer | Pablo Vizcay <pablo.vizcay@gmail.com> | 2015-04-09 04:48:01 -0300 |
commit | 6c5a53e9ca4a81c40fbf7ebe2c63663ac9eb4f6d (patch) | |
tree | 3af9d9855dc3f7b3b485a8a0340af9f3f95e6fa5 /railties/lib | |
parent | 8c8e9b34d576d2b223345d9073aca28c7975ecd7 (diff) | |
download | rails-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.rb | 6 |
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 |