mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/stats.rb (RDoc#print): get rid of NaN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
78c48e48ba
commit
994876860b
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Nov 11 21:49:06 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/rdoc/stats.rb (RDoc#print): get rid of NaN.
|
||||||
|
|
||||||
Thu Nov 11 21:47:12 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Nov 11 21:47:12 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (SHOWFLAGS): show compile flags.
|
* common.mk (SHOWFLAGS): show compile flags.
|
||||||
|
|
|
@ -89,7 +89,7 @@ class RDoc::Stats
|
||||||
doc_items = items -
|
doc_items = items -
|
||||||
nodoc_classes - @nodoc_constants - nodoc_modules - @nodoc_methods
|
nodoc_classes - @nodoc_constants - nodoc_modules - @nodoc_methods
|
||||||
|
|
||||||
percent_doc = doc_items.to_f / items * 100
|
percent_doc = doc_items.to_f / items * 100 if items.nonzero?
|
||||||
|
|
||||||
puts "Files: %5d" % @num_files
|
puts "Files: %5d" % @num_files
|
||||||
puts "Classes: %5d (%5d undocumented)" % [num_classes, nodoc_classes]
|
puts "Classes: %5d (%5d undocumented)" % [num_classes, nodoc_classes]
|
||||||
|
@ -97,7 +97,7 @@ class RDoc::Stats
|
||||||
[@num_constants, @nodoc_constants]
|
[@num_constants, @nodoc_constants]
|
||||||
puts "Modules: %5d (%5d undocumented)" % [num_modules, nodoc_modules]
|
puts "Modules: %5d (%5d undocumented)" % [num_modules, nodoc_modules]
|
||||||
puts "Methods: %5d (%5d undocumented)" % [@num_methods, @nodoc_methods]
|
puts "Methods: %5d (%5d undocumented)" % [@num_methods, @nodoc_methods]
|
||||||
puts "%6.2f%% documented" % percent_doc
|
puts "%6.2f%% documented" % percent_doc if percent_doc
|
||||||
puts
|
puts
|
||||||
puts "Elapsed: %0.1fs" % (Time.now - @start)
|
puts "Elapsed: %0.1fs" % (Time.now - @start)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue