[ANN] RDoc 2.4.2 Released

E

Eric Hodel

rdoc version 2.4.2 has been released!

* RDoc Project Page - http://rubyforge.org/projects/rdoc/
* RDoc Documentation - http://rdoc.rubyforge.org/
* RDoc Bug Tracker - =
http://rubyforge.org/tracker/?atid=3D2472&group_id=3D627&func=3Dbrowse

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

At this point in time, RDoc 2.x is a work in progress and may incur =20
further
API changes beyond what has been made to RDoc 1.0.1. Command-line =20
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/=20
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 =20=

Lars
Christensen.
* Possible fix for Dir::[] and Pathname interaction on 1.9. Bug =20
#24650 by
tiburon.
* Fixed scanning constants for if/end, etc. pairs. Bug #24609 by =20
Ryan
Davis.
* Fixed private methods in the C parser. Bug #24599 by Aaron =20
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 Gray. See RDoc for details.
* Fixed parsing and display of arg params for some corner cases. =20
Bug #21113
by Csisz=E1r Attila.
* Fixed links in Files box. Patch #24403 by Eric Wong.
* Toplevel methods now appear in Object. Bug #22677 by Ryan Davis.
* Added back --promiscuous which didn't do anything you cared =20
about. Why
did you enable it? Nobody looked at that page! Oh, it warns, too.
 
M

matt neuburg

Eric Hodel said:
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.
 
N

Nobuyoshi Nakada

Hi,

At Thu, 26 Mar 2009 08:20:47 +0900,
Eric Hodel wrote in [ruby-talk:332150]:
rdoc version 2.4.2 has been released!

Any plan to update the bundled rdoc in the repository?
 
R

Ryan Davis

Hi,

At Thu, 26 Mar 2009 08:20:47 +0900,
Eric Hodel 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. :/
 
N

Nobuyoshi Nakada

Hi,

At Sat, 25 Apr 2009 07:37:21 +0900,
Ryan Davis wrote in [ruby-talk:334956]:
Yes. Eric and I both need to update the repo w/ stuff we've released. :/

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
 
R

Ryan Davis

Hi,

At Sat, 25 Apr 2009 07:37:21 +0900,
Ryan Davis wrote in [ruby-talk:334956]:
Yes. Eric and I both need to update the repo w/ stuff we've
released. :/

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

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]}"

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top