1
0
Fork 0
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:
nobu 2010-11-11 12:49:11 +00:00
parent 78c48e48ba
commit 994876860b
2 changed files with 6 additions and 2 deletions

View file

@ -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>
* common.mk (SHOWFLAGS): show compile flags.

View file

@ -89,7 +89,7 @@ class RDoc::Stats
doc_items = items -
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 "Classes: %5d (%5d undocumented)" % [num_classes, nodoc_classes]
@ -97,7 +97,7 @@ class RDoc::Stats
[@num_constants, @nodoc_constants]
puts "Modules: %5d (%5d undocumented)" % [num_modules, nodoc_modules]
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 "Elapsed: %0.1fs" % (Time.now - @start)
end