1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc: Update to RDoc 3.9. Fixed ri [], stopdoc creating an

object reference, nodoc for class aliases, verbatim === lines.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-07-31 00:19:00 +00:00
parent 4ac69a57b5
commit 89b601d176
33 changed files with 1329 additions and 600 deletions

View file

@ -71,9 +71,7 @@ class RDoc::Markup::Document
# Does this document have no parts?
def empty?
@parts.empty? or
(@parts.length == 1 and RDoc::Markup::Document === @parts.first and
@parts.first.empty?)
@parts.empty? or (@parts.length == 1 and merged? and @parts.first.empty?)
end
##
@ -85,6 +83,11 @@ class RDoc::Markup::Document
# The information in +other+ is preferred over the receiver
def merge other
if empty? then
@parts = other.parts
return self
end
other.parts.each do |other_part|
self.parts.delete_if do |self_part|
self_part.file and self_part.file == other_part.file
@ -96,6 +99,13 @@ class RDoc::Markup::Document
self
end
##
# Does this Document contain other Documents?
def merged?
RDoc::Markup::Document === @parts.first
end
def pretty_print q # :nodoc:
start = @file ? "[doc (#{@file}): " : '[doc: '