@@ -416,14 +416,17 @@ def add_class class_type, given_name, superclass = '::Object'
416416 # to +self+, and its #section to #current_section. Returns +mod+.
417417
418418 def add_class_or_module mod , self_hash , all_hash
419- mod . section = @current_section # TODO declaring context? something is wrong here...
419+ mod . section = @current_section # TODO declaring context? something is
420+ # wrong here...
420421 mod . parent = self
422+
421423 unless @done_documenting then
422424 self_hash [ mod . name ] = mod
423- # this must be done AFTER adding mod to its parent,
424- # so that the full name is correct:
425+ # this must be done AFTER adding mod to its parent, so that the full
426+ # name is correct:
425427 all_hash [ mod . full_name ] = mod
426428 end
429+
427430 mod
428431 end
429432
@@ -484,8 +487,10 @@ def add_method(method)
484487 def add_module ( class_type , name )
485488 mod = @classes [ name ] || @modules [ name ]
486489 return mod if mod
487- full_name = child_name ( name )
490+
491+ full_name = child_name name
488492 mod = RDoc ::TopLevel . modules_hash [ full_name ] || class_type . new ( name )
493+
489494 add_class_or_module ( mod , @modules , RDoc ::TopLevel . modules_hash )
490495 end
491496
@@ -1011,7 +1016,8 @@ def to_s # :nodoc:
10111016 ##
10121017 # Return the TopLevel that owns us
10131018 #--
1014- # FIXME we can be 'owned' by several TopLevel (see #record_location & #in_files)
1019+ # FIXME we can be 'owned' by several TopLevel (see #record_location &
1020+ # #in_files)
10151021
10161022 def top_level
10171023 return @top_level if defined? @top_level
@@ -1029,8 +1035,8 @@ def upgrade_to_class mod, class_type, enclosing
10291035 klass = RDoc ::ClassModule . from_module class_type , mod
10301036
10311037 # if it was there, then we keep it even if done_documenting
1032- RDoc ::TopLevel . classes_hash [ full_name ] = klass
1033- enclosing . classes_hash [ name ] = klass
1038+ RDoc ::TopLevel . classes_hash [ mod . full_name ] = klass
1039+ enclosing . classes_hash [ mod . name ] = klass
10341040
10351041 klass
10361042 end
0 commit comments