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

Merge documentation from the same class on ri generation.

Fixes bug where documentation could disappear.

Fix typo in lib/rdoc/options.rb

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2008-01-07 02:52:15 +00:00
parent 063beac343
commit d9d3e87a52
3 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,14 @@
Mon Jan 7 11:51:49 2008 Eric Hodel <drbrain@segment7.net>
* lib/rdoc/generators/ri_generator.rb: Merge documentation from the
same class on output. Fixes bug where documentation could
disappear.
* lib/rdoc/options.rb: Fix typo.
* lib/rdoc/generators/*: Clean up some namespacing and make RDoc
consistent.
Mon Jan 7 11:44:45 2008 Tanaka Akira <akr@fsij.org>
* encoding.c (rb_enc_internal_get_index): extracted from

View file

@ -28,6 +28,8 @@ class Generators::RIGenerator
@ri_writer = RI::RiWriter.new(".")
@markup = SM::SimpleMarkup.new
@to_flow = SM::ToFlow.new
@generated = {}
end
##
@ -205,17 +207,21 @@ class Generators::RIGenerator
end
end
if old_cls.nil?
# no merge: simply overwrite
@ri_writer.remove_class(cls_desc)
@ri_writer.add_class(cls_desc)
else
# existing class: merge in
old_desc = rdr.get_class(old_cls)
prev_cls = @generated[cls_desc.full_name]
old_desc.merge_in(cls_desc)
@ri_writer.add_class(old_desc)
if old_cls and not prev_cls then
old_desc = rdr.get_class old_cls
cls_desc.merge_in old_desc
end
if prev_cls then
cls_desc.merge_in prev_cls
end
@generated[cls_desc.full_name] = cls_desc
@ri_writer.remove_class cls_desc
@ri_writer.add_class cls_desc
end
end

View file

@ -352,7 +352,7 @@ class Options
@op_name = nil
@show_all = false
@main_page = nil
@marge = false
@merge = false
@exclude = []
@quiet = false
@generator_name = 'html'