Update to RDoc 2.5.5

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-04-21 03:10:03 +00:00
parent f8e51f7e59
commit a7df5ace7e
7 changed files with 32 additions and 12 deletions

View File

@ -1,3 +1,8 @@
Wed Apr 21 11:53:47 2010 Eric Hodel <drbrain@segment7.net>
* 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@ruby-lang.org> Wed Apr 21 11:31:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_yylex): abandoned EXPR_VCALL. * parse.y (parser_yylex): abandoned EXPR_VCALL.

2
NEWS
View File

@ -211,7 +211,7 @@ with all sufficient information, see the ChangeLog file.
* RDoc * RDoc
* Updated to RDoc 2.5.3 * Updated to RDoc 2.5.5
* logger * logger

View File

@ -383,7 +383,7 @@ module RDoc
## ##
# RDoc version you are using # 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 # Name of the dotfile that contains the description of files to be processed

View File

@ -173,6 +173,7 @@ class RDoc::AnyMethod < RDoc::CodeObject
@dont_rename_initialize = nil @dont_rename_initialize = nil
@is_alias_for = nil @is_alias_for = nil
@token_stream = nil @token_stream = nil
@aliases = []
@name = array[1] @name = array[1]
@full_name = array[2] @full_name = array[2]
@ -181,7 +182,6 @@ class RDoc::AnyMethod < RDoc::CodeObject
@comment = array[5] @comment = array[5]
@call_seq = array[6] @call_seq = array[6]
@block_params = array[7] @block_params = array[7]
@aliases = array[8]
@params = array[9] @params = array[9]
@parent_name = if @full_name =~ /#/ then @parent_name = if @full_name =~ /#/ then
@ -192,8 +192,8 @@ class RDoc::AnyMethod < RDoc::CodeObject
name.join '::' name.join '::'
end end
array[8].each do |old_name, new_name, comment| array[8].each do |new_name, comment|
add_alias RDoc::Alias.new(nil, old_name, new_name, comment) add_alias RDoc::Alias.new(nil, @name, new_name, comment)
end end
end end

View File

@ -270,8 +270,12 @@ ul.link-list .type {
margin: 1em 0.4em; margin: 1em 0.4em;
} }
#description li p {
margin: 0;
}
#description ul { #description ul {
margin-left: 2em; margin-left: 1.5em;
} }
#description ul li { #description ul li {
line-height: 1.4em; line-height: 1.4em;
@ -401,6 +405,9 @@ ul.link-list .type {
#documentation .method-description p + p { #documentation .method-description p + p {
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
#documentation .method-description ul {
margin-left: 1.5em;
}
#documentation .attribute-method-heading { #documentation .attribute-method-heading {
background: url(images/tag_green.png) no-repeat left bottom; background: url(images/tag_green.png) no-repeat left bottom;

View File

@ -350,13 +350,14 @@ Usage: #{opt.program_name} [options] [names...]
end end
argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT'] argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT']
ignored = []
begin begin
opts.parse! argv opts.parse! argv
rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
if ignore_invalid and not quiet then if ignore_invalid then
$stderr.puts e ignored << e.args.join(' ')
$stderr.puts '(invalid options are ignored)' retry
else else
$stderr.puts opts $stderr.puts opts
$stderr.puts $stderr.puts
@ -365,6 +366,11 @@ Usage: #{opt.program_name} [options] [names...]
end end
end end
if ignored and not quiet then
$stderr.puts "invalid options: #{ignored.join ', '}"
$stderr.puts '(invalid options are ignored)'
end
@op_dir ||= 'doc' @op_dir ||= 'doc'
@files = argv.dup @files = argv.dup

View File

@ -14,16 +14,18 @@ class TestRDocOptions < MiniTest::Unit::TestCase
end end
refute_match %r%^Usage: %, err refute_match %r%^Usage: %, err
assert_match %r%^invalid option: --bogus%, err assert_match %r%^invalid options: --bogus%, err
end end
def test_parse_ignore_invalid_default def test_parse_ignore_invalid_default
out, err = capture_io do out, err = capture_io do
@options.parse %w[--bogus] @options.parse %w[--bogus --main BLAH]
end end
refute_match %r%^Usage: %, err 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 end
def test_parse_ignore_invalid_no def test_parse_ignore_invalid_no