diff options
author | thedarkone <thedarkone2@gmail.com> | 2011-07-25 17:01:30 +0200 |
---|---|---|
committer | thedarkone <thedarkone2@gmail.com> | 2011-07-25 17:02:28 +0200 |
commit | 624b11861658478e9dcd75728f4f3e9d91e8c03d (patch) | |
tree | d140e28eaeefd1d780763e5c58abb51d29ac0c32 /railties/lib/rails | |
parent | 02691d3516e68b2de5545ec7a495024a377f89fc (diff) | |
download | rails-624b11861658478e9dcd75728f4f3e9d91e8c03d.tar.gz rails-624b11861658478e9dcd75728f4f3e9d91e8c03d.tar.bz2 rails-624b11861658478e9dcd75728f4f3e9d91e8c03d.zip |
Use shorter class-level File methods instead of going through File.stat.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/code_statistics.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb index 770c23ae41..e6822b75b7 100644 --- a/railties/lib/rails/code_statistics.rb +++ b/railties/lib/rails/code_statistics.rb @@ -30,7 +30,7 @@ class CodeStatistics #:nodoc: stats = { "lines" => 0, "codelines" => 0, "classes" => 0, "methods" => 0 } Dir.foreach(directory) do |file_name| - if File.stat(directory + "/" + file_name).directory? and (/^\./ !~ file_name) + if File.directory?(directory + "/" + file_name) and (/^\./ !~ file_name) newstats = calculate_directory_statistics(directory + "/" + file_name, pattern) stats.each { |k, v| stats[k] += newstats[k] } end |