[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] RDoc 2.4.2 Released

Eric Hodel

3/25/2009 11:21:00 PM

rdoc version 2.4.2 has been released!

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

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.


5 Answers

matt

3/26/2009 2:15:00 PM

0

Eric Hodel <drbrain@segment7.net> 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.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

Nobuyoshi Nakada

4/24/2009 10:28:00 PM

0

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?

--
Nobu Nakada

Ryan Davis

4/24/2009 10:37:00 PM

0


On Apr 24, 2009, at 15:28 , Nobuyoshi Nakada wrote:

> 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. :/


Nobuyoshi Nakada

4/25/2009 1:04:00 AM

0

Hi,

At Sat, 25 Apr 2009 07:37:21 +0900,
Ryan Davis 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. :/

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



--
Nobu Nakada

Ryan Davis

4/25/2009 8:18:00 AM

0


On Apr 24, 2009, at 18:04 , Nobuyoshi Nakada wrote:

> Hi,
>
> At Sat, 25 Apr 2009 07:37:21 +0900,
> Ryan Davis 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. :/
>
> 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.