# File lib/rdoc/context.rb, line 447 def add_module_alias from, name, file return from if @done_documenting to_name = child_name(name) # if we already know this name, don't register an alias: # see the metaprogramming in lib/active_support/basic_object.rb, # where we already know BasicObject as a class when we find # BasicObject = BlankSlate return from if RDoc::TopLevel.find_class_or_module(to_name) if from.module? then RDoc::TopLevel.modules_hash[to_name] = from @modules[name] = from else RDoc::TopLevel.classes_hash[to_name] = from @classes[name] = from end # HACK: register a constant for this alias: # constant value and comment will be updated after, # when the Ruby parser adds the constant const = RDoc::Constant.new name, nil, '' const.record_location file const.is_alias_for = from add_constant const from end