mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Put RDoc comments into array.c, and refine rdoc/ri to deal with stuff that arose
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									6ef31af2d1
								
							
						
					
					
						commit
						bc8c73c42a
					
				
					 10 changed files with 1005 additions and 45 deletions
				
			
		
							
								
								
									
										16
									
								
								bin/ri
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								bin/ri
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -49,7 +49,9 @@ class  RiDisplay
 | 
			
		|||
  ######################################################################
 | 
			
		||||
  
 | 
			
		||||
  def display_params(method)
 | 
			
		||||
 | 
			
		||||
    params = method.params
 | 
			
		||||
 | 
			
		||||
    if params[0,1] == "("
 | 
			
		||||
      if method.is_singleton
 | 
			
		||||
        params = method.full_name + params
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +59,7 @@ class  RiDisplay
 | 
			
		|||
        params = method.name + params
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    @formatter.wrap(params)
 | 
			
		||||
    params.split(/\n/).each {|p| @formatter.wrap(p) }
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  ######################################################################
 | 
			
		||||
| 
						 | 
				
			
			@ -107,10 +109,16 @@ def display_class_info(class_entry)
 | 
			
		|||
    end 
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  unless klass.method_list.empty?
 | 
			
		||||
  unless klass.class_methods.empty?
 | 
			
		||||
    @formatter.blankline
 | 
			
		||||
    @formatter.wrap("Methods:", "")
 | 
			
		||||
    @formatter.wrap(klass.method_list.map{|m| m.name}.sort.join(', '))
 | 
			
		||||
    @formatter.wrap("Class methods:", "")
 | 
			
		||||
    @formatter.wrap(klass.class_methods.map{|m| m.name}.sort.join(', '))
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  unless klass.instance_methods.empty?
 | 
			
		||||
    @formatter.blankline
 | 
			
		||||
    @formatter.wrap("Instance methods:", "")
 | 
			
		||||
    @formatter.wrap(klass.instance_methods.map{|m| m.name}.sort.join(', '))
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  unless klass.attributes.empty?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue