RDoc 2.4.2 Released

rdoc version 2.4.2 has been released!

RDoc is an application that produces documentation for one or more
Ruby source
files. RDoc includes the +rdoc+ and +ri+ tools for generating and
displaying
online documentation.

At this point in time, RDoc 2.x is a work in progress and may incur
further
API changes beyond what has been made to RDoc 1.0.1. Command-line
tools are
largely unaffected, but internal APIs may shift rapidly.

See RDoc for a description of RDoc’s markup and basic use.

Changes:

2.4.2 / 2009-03-25

  • 2 Minor Enhancements

    • Added --pipe for turning RDoc on stdin into HTML
    • Added rdoc/task.rb containing a replacement for rake/
      rdoctask.rb. Use
      RDoc::Task now instead of Rake::RDocTask.
  • 10 Bug Fixes

    • Writing the ri cache file to the proper directory. Bug #24459 by
      Lars
      Christensen.
    • Possible fix for Dir::[] and Pathname interaction on 1.9. Bug
      #24650 by
      tiburon.
    • Fixed scanning constants for if/end, etc. pairs. Bug #24609 by
      Ryan
      Davis.
    • Fixed private methods in the C parser. Bug #24599 by Aaron
      Patterson.
    • Fixed display of markup on RDoc main page. Bug #24168 by rhubarb.
    • Fixed display of \ character in documentation proceeding words.
      Bug #22112 by James G… See RDoc for details.
    • Fixed parsing and display of arg params for some corner cases.
      Bug #21113
      by Csiszár Attila.
    • Fixed links in Files box. Patch #24403 by Eric W…
    • Toplevel methods now appear in Object. Bug #22677 by Ryan D…
    • Added back --promiscuous which didn’t do anything you cared
      about. Why
      did you enable it? Nobody looked at that page! Oh, it warns, too.

Eric H. [email protected] wrote:

rdoc version 2.4.2 has been released!

Better and better. But OMM (still using ruby 1.8.6) I still often
encounter basic methods that show up in “ri” with no description:

$ ri String.tr
[no description]
$ ri String.squeeze!
[no description]

And so on. Not sure why… m.

On Apr 24, 2009, at 15:28 , Nobuyoshi N. wrote:

Hi,

At Thu, 26 Mar 2009 08:20:47 +0900,
Eric H. wrote in [ruby-talk:332150]:

rdoc version 2.4.2 has been released!

Any plan to update the bundled rdoc in the repository?

Yes. Eric and I both need to update the repo w/ stuff we’ve released. :confused:

Hi,

At Thu, 26 Mar 2009 08:20:47 +0900,
Eric H. wrote in [ruby-talk:332150]:

rdoc version 2.4.2 has been released!

Any plan to update the bundled rdoc in the repository?

On Apr 24, 2009, at 18:04 , Nobuyoshi N. wrote:

  • base = File.join(RbConfig::CONFIG[‘datadir’], “ri”, VERSION)
  • pre, post = RbConfig::CONFIG[‘RUBY_INSTALL_NAME’].split(/ruby/, 2)
  • ri = “#{pre||’’}ri#{post||’’}”
  • rdoc = “#{m[0]}rdoc#{m[1]}”

Hrm. Either ruby svn and rdoc svn have diverged, or something else is
weird with this patch. For example, ‘m’ is not a local variable in
this method, and there has been very little activity on the rdoc svn
side. I’ll poke around, but I think I’m going to have to leave this to
eric to merge. thanks for the heads up.

Hi,

At Sat, 25 Apr 2009 07:37:21 +0900,
Ryan D. wrote in [ruby-talk:334956]:

rdoc version 2.4.2 has been released!

Any plan to update the bundled rdoc in the repository?

Yes. Eric and I both need to update the repo w/ stuff we’ve released. :confused:

FYI, there’re a couple of fixes, specific and non-specific to
1.9, other than removing trailing spaces.

Index: lib/rdoc/parser.rb

— lib/rdoc/parser.rb (revision 19930)
+++ lib/rdoc/parser.rb (working copy)
@@ -64,15 +64,9 @@ class RDoc::Parser # r20986, r23071

  • Shamelessly stolen from the ptools gem (since RDoc cannot depend on

  • the gem).

  • Return true if the +file+ seems like binary.

    def self.binary?(file)

  • s = (File.read(file, File.stat(file).blksize) || “”).split(//)
  • if s.size > 0 then
  •  ((s.size - s.grep(" ".."~").size) / s.size.to_f) > 0.30
    
  • else
  •  false
    
  • end
  • s = File.read(file, 1024)
  • s.count("^ -~\t\r\n").fdiv(s.size) > 0.3 || s.index("\x00") unless
    s.empty?
    end
    private_class_method :binary?
    Index: lib/rdoc/ri/paths.rb
    ===================================================================
    — lib/rdoc/ri/paths.rb (revision 19930)
    +++ lib/rdoc/ri/paths.rb (working copy)
    @@ -29,4 +29,7 @@ module RDoc::RI::Paths # r23070
    VERSION = RbConfig::CONFIG[‘ruby_version’]
  • base = File.join(RbConfig::CONFIG[‘datadir’], “ri”, VERSION)
  • pre, post = RbConfig::CONFIG[‘RUBY_INSTALL_NAME’].split(/ruby/, 2)
  • ri = “#{pre||’’}ri#{post||’’}”
  • rdoc = “#{m[0]}rdoc#{m[1]}”
  • base = File.join(RbConfig::CONFIG[‘datadir’], ri, VERSION)
    SYSDIR = File.join(base, “system”)
    @@ -33,10 +36,4 @@ # r21312
    SITEDIR = File.join(base, “site”)
  • homedir = ENV[‘HOME’] || ENV[‘USERPROFILE’] || ENV[‘HOMEPATH’]
  • if homedir then
  • HOMEDIR = File.join(homedir, “.rdoc”)
  • else
  • HOMEDIR = nil
  • end
  • HOMEDIR = (File.expand_path("~/.#{rdoc}") rescue nil)

    begin
    Index: test/rdoc/test_rdoc_info_formatting.rb
    ===================================================================
    — test/rdoc/test_rdoc_info_formatting.rb (revision 19930)
    +++ test/rdoc/test_rdoc_info_formatting.rb (revision 23268)
    @@ -9,5 +9,5 @@ require ‘rdoc/generator/texinfo’ # r21101
    class TestRDocInfoFormatting < MiniTest::Unit::TestCase
    def setup

  • @output_dir = File.join Dir.tmpdir,
    “test_rdoc_info_formatting_#{$$}”
  • @output_dir = File.join Dir.mktmpdir(“test_rdoc_”),
    “info_formatting”
    @output_file = File.join @output_dir, ‘rdoc.texinfo’

@@ -21,5 +21,5 @@ class TestRDocInfoFormatting < MiniTest:

def teardown

  • FileUtils.rm_rf @output_dir

  • FileUtils.rm_rf File.dirname(@output_dir)
    end

Index: test/rdoc/test_rdoc_markup_to_html_crossref.rb

— test/rdoc/test_rdoc_markup_to_html_crossref.rb (revision 19930)
+++ test/rdoc/test_rdoc_markup_to_html_crossref.rb (revision 23268)
@@ -85,5 +85,10 @@ class TestRDocMarkupToHtmlCrossref < Min # r22806
result.gsub!(/\n/, " ")

  • assert_equal actual_expected_result, result
  • begin
  •  assert_equal actual_expected_result, result
    
  • rescue MiniTest::Assertion => e
  •  bt = caller(2)
    
  •  raise e, [e.message, 
    

*bt.grep(/\A#{Regexp.quote(FILE)}:/o)].join("\n"), bt

  • end
    end