@@ -416,14 +416,17 @@ def add_class class_type, given_name, superclass = '::Object'
416
416
# to +self+, and its #section to #current_section. Returns +mod+.
417
417
418
418
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...
420
421
mod . parent = self
422
+
421
423
unless @done_documenting then
422
424
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:
425
427
all_hash [ mod . full_name ] = mod
426
428
end
429
+
427
430
mod
428
431
end
429
432
@@ -484,8 +487,10 @@ def add_method(method)
484
487
def add_module ( class_type , name )
485
488
mod = @classes [ name ] || @modules [ name ]
486
489
return mod if mod
487
- full_name = child_name ( name )
490
+
491
+ full_name = child_name name
488
492
mod = RDoc ::TopLevel . modules_hash [ full_name ] || class_type . new ( name )
493
+
489
494
add_class_or_module ( mod , @modules , RDoc ::TopLevel . modules_hash )
490
495
end
491
496
@@ -1011,7 +1016,8 @@ def to_s # :nodoc:
1011
1016
##
1012
1017
# Return the TopLevel that owns us
1013
1018
#--
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)
1015
1021
1016
1022
def top_level
1017
1023
return @top_level if defined? @top_level
@@ -1029,8 +1035,8 @@ def upgrade_to_class mod, class_type, enclosing
1029
1035
klass = RDoc ::ClassModule . from_module class_type , mod
1030
1036
1031
1037
# 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
1034
1040
1035
1041
klass
1036
1042
end
0 commit comments