[前][次][番号順一覧][スレッド一覧]

ruby-changes:15525

From: drbrain <ko1@a...>
Date: Wed, 21 Apr 2010 12:10:22 +0900 (JST)
Subject: [ruby-changes:15525] Ruby:r27428 (trunk): Update to RDoc 2.5.5

drbrain	2010-04-21 12:10:03 +0900 (Wed, 21 Apr 2010)

  New Revision: 27428

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27428

  Log:
    Update to RDoc 2.5.5

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/lib/rdoc/any_method.rb
    trunk/lib/rdoc/generator/template/darkfish/rdoc.css
    trunk/lib/rdoc/options.rb
    trunk/lib/rdoc.rb
    trunk/test/rdoc/test_rdoc_options.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27427)
+++ ChangeLog	(revision 27428)
@@ -1,3 +1,8 @@
+Wed Apr 21 11:53:47 2010  Eric Hodel  <drbrain@s...>
+
+	* lib/rdoc:  Update to RDoc 2.5.5.  Fixes bugs in ri, Darkfish and
+	  rdoc option handling.
+
 Wed Apr 21 11:31:35 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (parser_yylex): abandoned EXPR_VCALL.
Index: lib/rdoc.rb
===================================================================
--- lib/rdoc.rb	(revision 27427)
+++ lib/rdoc.rb	(revision 27428)
@@ -383,7 +383,7 @@
   ##
   # RDoc version you are using
 
-  VERSION = '2.5.4'
+  VERSION = '2.5.5'
 
   ##
   # Name of the dotfile that contains the description of files to be processed
Index: lib/rdoc/generator/template/darkfish/rdoc.css
===================================================================
--- lib/rdoc/generator/template/darkfish/rdoc.css	(revision 27427)
+++ lib/rdoc/generator/template/darkfish/rdoc.css	(revision 27428)
@@ -270,8 +270,12 @@
 	margin: 1em 0.4em;
 }
 
+#description li p {
+  margin: 0;
+}
+
 #description ul {
-	margin-left: 2em;
+	margin-left: 1.5em;
 }
 #description ul li {
 	line-height: 1.4em;
@@ -401,6 +405,9 @@
 #documentation .method-description p + p {
 	margin-bottom: 0.5em;
 }
+#documentation .method-description ul {
+  margin-left: 1.5em;
+}
 
 #documentation .attribute-method-heading {
 	background: url(images/tag_green.png) no-repeat left bottom;
Index: lib/rdoc/any_method.rb
===================================================================
--- lib/rdoc/any_method.rb	(revision 27427)
+++ lib/rdoc/any_method.rb	(revision 27428)
@@ -173,6 +173,7 @@
     @dont_rename_initialize = nil
     @is_alias_for           = nil
     @token_stream           = nil
+    @aliases                = []
 
     @name         = array[1]
     @full_name    = array[2]
@@ -181,7 +182,6 @@
     @comment      = array[5]
     @call_seq     = array[6]
     @block_params = array[7]
-    @aliases      = array[8]
     @params       = array[9]
 
     @parent_name = if @full_name =~ /#/ then
@@ -192,8 +192,8 @@
                      name.join '::'
                    end
 
-    array[8].each do |old_name, new_name, comment|
-      add_alias RDoc::Alias.new(nil, old_name, new_name, comment)
+    array[8].each do |new_name, comment|
+      add_alias RDoc::Alias.new(nil, @name, new_name, comment)
     end
   end
 
Index: lib/rdoc/options.rb
===================================================================
--- lib/rdoc/options.rb	(revision 27427)
+++ lib/rdoc/options.rb	(revision 27428)
@@ -350,13 +350,14 @@
     end
 
     argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT']
+    ignored = []
 
     begin
       opts.parse! argv
     rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-      if ignore_invalid and not quiet then
-        $stderr.puts e
-        $stderr.puts '(invalid options are ignored)'
+      if ignore_invalid then
+        ignored << e.args.join(' ')
+        retry
       else
         $stderr.puts opts
         $stderr.puts
@@ -365,6 +366,11 @@
       end
     end
 
+    if ignored and not quiet then
+      $stderr.puts "invalid options: #{ignored.join ', '}"
+      $stderr.puts '(invalid options are ignored)'
+    end
+
     @op_dir ||= 'doc'
     @files = argv.dup
 
Index: NEWS
===================================================================
--- NEWS	(revision 27427)
+++ NEWS	(revision 27428)
@@ -211,7 +211,7 @@
 
 * RDoc
 
-  * Updated to RDoc 2.5.3
+  * Updated to RDoc 2.5.5
 
 * logger
 
Index: test/rdoc/test_rdoc_options.rb
===================================================================
--- test/rdoc/test_rdoc_options.rb	(revision 27427)
+++ test/rdoc/test_rdoc_options.rb	(revision 27428)
@@ -14,16 +14,18 @@
     end
 
     refute_match %r%^Usage: %, err
-    assert_match %r%^invalid option: --bogus%, err
+    assert_match %r%^invalid options: --bogus%, err
   end
 
   def test_parse_ignore_invalid_default
     out, err = capture_io do
-      @options.parse %w[--bogus]
+      @options.parse %w[--bogus --main BLAH]
     end
 
     refute_match %r%^Usage: %, err
-    assert_match %r%^invalid option: --bogus%, err
+    assert_match %r%^invalid options: --bogus%, err
+
+    assert_equal 'BLAH', @options.main_page
   end
 
   def test_parse_ignore_invalid_no

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]