[Rubygems-developers] rdoc, ri, and gem integration?

Daniel Harple dharple at generalconsumption.org
Wed Jun 7 19:37:07 EDT 2006

On Jun 3, 2006, at 9:01 PM, Jim Weirich wrote:

> Currently, the gem command (in CVS Head) will generate the RI docs
> automatically whenever it generates the RDoc data.

If someone redefines a method or adds one to a class it will show up  
in ri, IIRC. That *sucks*. When I look at the ri docs for Array, I  
only want to see the original Array docs, not what someone added to  
it (or redefined). The HTML documentation generated by rdoc also has  
this issue, but it is not a problem because it is localized.


% cat test.rb
# ri....
class String
   # blah
   def string_does_not_have_enough_methods
% rdoc --ri test.rb
% ri String
---------------------------------------------------------- Class: String
      A +String+ object holds and manipulates an arbitrary sequence of

      squeeze, squeeze!, string_does_not_have_enough_methods, strip,

Another problem (ri bug):

% rdoc --ri /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib
% ri Array
/opt/local/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in `concat':  
can't convert nil into Array (TypeError)
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb: 
99:in `merge_in'
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_reader.rb:56:in  
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in  
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_driver.rb:70:in  
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_driver.rb:106:in  
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_driver.rb:135:in  
         from /opt/local/lib/ruby/1.8/rdoc/ri/ri_driver.rb:134:in  
         from /opt/local/bin/ri:48
% ruby --version
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.6.0]

-- Daniel

More information about the Rubygems-developers mailing list