* lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)

https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016--
  https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-09-05 10:35:30 +00:00
Родитель 0d715e1b75
Коммит 23863ff75d
27 изменённых файлов: 667 добавлений и 421 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Mon Sep 5 19:35:22 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)
https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016--
https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09
Sun Sep 4 00:17:55 2016 Sho Hashimoto <sho-h@ruby-lang.org>
* proc.c: [DOC] fix Object#define_singleton_method and

Просмотреть файл

@ -65,7 +65,7 @@ module RDoc
##
# RDoc version you are using
VERSION = '4.2.1'
VERSION = '4.2.3'
##
# Method visibilities

Просмотреть файл

@ -789,7 +789,9 @@ class RDoc::Context < RDoc::CodeObject
# Finds a constant with +name+ in this context
def find_constant_named(name)
@constants.find {|m| m.name == name}
@constants.find do |m|
m.name == name || m.full_name == name
end
end
##

Просмотреть файл

@ -58,6 +58,8 @@ class RDoc::Context::Section
self.class === other and @title == other.title
end
alias eql? ==
##
# Adds +comment+ to this section
@ -128,6 +130,10 @@ class RDoc::Context::Section
"#<%s:0x%x %p>" % [self.class, object_id, title]
end
def hash # :nodoc:
@title.hash
end
##
# The files comments in this section come from

Просмотреть файл

@ -74,10 +74,21 @@ module RDoc::Encoding
nil
end
def self.remove_frozen_string_literal string
string =~ /\A(?:#!.*\n)?(.*\n)/
first_line = $1
if first_line =~ /\A# +frozen[-_]string[-_]literal[=:].+$/i
string.sub! first_line, ''
end
end
##
# Sets the encoding of +string+ based on the magic comment
def self.set_encoding string
remove_frozen_string_literal string
string =~ /\A(?:#!.*\n)?(.*\n)/
first_line = $1
@ -90,6 +101,8 @@ module RDoc::Encoding
string.sub! first_line, ''
remove_frozen_string_literal string
return unless Object.const_defined? :Encoding
enc = Encoding.find name

Просмотреть файл

@ -3,7 +3,8 @@
<title><%= h @title %></title>
<script type="text/javascript">
var rdoc_rel_prefix = "<%= rel_prefix %>/";
var rdoc_rel_prefix = "<%= asset_rel_prefix %>/";
var index_rel_prefix = "<%= rel_prefix %>/";
</script>
<script src="<%= asset_rel_prefix %>/js/jquery.js"></script>

Просмотреть файл

@ -17,7 +17,7 @@
font-weight: 400;
src: local("Source Code Pro"),
local("SourceCodePro-Regular"),
url("fonts/SourceCodePro-Regular.ttf") format("truetype");
url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
}
@font-face {
@ -26,7 +26,7 @@
font-weight: 700;
src: local("Source Code Pro Bold"),
local("SourceCodePro-Bold"),
url("fonts/SourceCodePro-Bold.ttf") format("truetype");
url("../fonts/SourceCodePro-Bold.ttf") format("truetype");
}
/*
@ -46,7 +46,7 @@
font-weight: 300;
src: local("Lato Light"),
local("Lato-Light"),
url("fonts/Lato-Light.ttf") format("truetype");
url("../fonts/Lato-Light.ttf") format("truetype");
}
@font-face {
@ -55,7 +55,7 @@
font-weight: 300;
src: local("Lato Light Italic"),
local("Lato-LightItalic"),
url("fonts/Lato-LightItalic.ttf") format("truetype");
url("../fonts/Lato-LightItalic.ttf") format("truetype");
}
@font-face {
@ -64,7 +64,7 @@
font-weight: 700;
src: local("Lato Regular"),
local("Lato-Regular"),
url("fonts/Lato-Regular.ttf") format("truetype");
url("../fonts/Lato-Regular.ttf") format("truetype");
}
@font-face {
@ -73,7 +73,7 @@
font-weight: 700;
src: local("Lato Italic"),
local("Lato-Italic"),
url("fonts/Lato-RegularItalic.ttf") format("truetype");
url("../fonts/Lato-RegularItalic.ttf") format("truetype");
}
/*

Просмотреть файл

@ -59,7 +59,7 @@ function hookSearch() {
var html = '';
// TODO add relative path to <script> per-page
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
if (result.params)
html += '<span class="params">' + result.params + '</span>';
html += '</a>';
@ -121,9 +121,9 @@ function highlightClickTarget( event ) {
};
};
function loadAsync(path, success) {
function loadAsync(path, success, prefix) {
$.ajax({
url: rdoc_rel_prefix + path,
url: prefix + path,
dataType: 'script',
success: success,
cache: true
@ -154,8 +154,8 @@ $(document).ready( function() {
});
}
loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
loadAsync('js/search.js', search_success_function('search_loaded'));
loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
});

Просмотреть файл

@ -172,6 +172,7 @@ Searcher.prototype = new function() {
result.path = info[2];
result.params = info[3];
result.snippet = info[4];
result.badge = info[6];
return result;
}

Просмотреть файл

@ -1,5 +1,4 @@
# coding: UTF-8
# frozen_string_literal: false
# :markup: markdown
##
@ -15,7 +14,7 @@
#
# data = File.read("README.md")
# formatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
# html = RDoc::Markdown.parse(data).accept(@formatter)
# html = RDoc::Markdown.parse(data).accept(formatter)
#
# # do something with html
#
@ -447,8 +446,6 @@ class RDoc::Markdown
else
return ans
end
return ans
end
end
@ -481,8 +478,6 @@ class RDoc::Markdown
else
return ans
end
return ans
end
end

Просмотреть файл

@ -606,18 +606,46 @@ class RDoc::Parser::C < RDoc::Parser
RDoc::Comment.new comment, @top_level
end
##
# Generate a Ruby-method table
def gen_body_table file_content
table = {}
file_content.scan(%r{
((?>/\*.*?\*/\s*)?)
((?:(?:\w+)\s+)?
(?:intern\s+)?VALUE\s+(\w+)
\s*(?:\([^)]*\))(?:[^;]|$))
| ((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+(\w+)\s+(\w+))
| ^\s*\#\s*define\s+(\w+)\s+(\w+)
}xm) do
case
when $1
table[$3] = [:func_def, $1, $2, $~.offset(2)] if !table[$3] || table[$3][0] != :func_def
when $4
table[$6] = [:macro_def, $4, $5, $~.offset(5), $7] if !table[$6] || table[$6][0] == :macro_alias
when $8
table[$8] ||= [:macro_alias, $9]
end
end
table
end
##
# Find the C code corresponding to a Ruby method
def find_body class_name, meth_name, meth_obj, file_content, quiet = false
case file_content
when %r%((?>/\*.*?\*/\s*)?)
((?:(?:\w+)\s+)?
(?:intern\s+)?VALUE\s+#{meth_name}
\s*(\([^)]*\))([^;]|$))%xm then
comment = RDoc::Comment.new $1, @top_level
body = $2
offset, = $~.offset(2)
if file_content
@body_table ||= {}
@body_table[file_content] ||= gen_body_table file_content
type, *args = @body_table[file_content][meth_name]
end
case type
when :func_def
comment = RDoc::Comment.new args[0], @top_level
body = args[1]
offset, = args[2]
comment.remove_private if comment
@ -646,12 +674,12 @@ class RDoc::Parser::C < RDoc::Parser
meth_obj.line = file_content[0, offset].count("\n") + 1
body
when %r%((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+#{meth_name}\s+(\w+))%m then
comment = RDoc::Comment.new $1, @top_level
body = $2
offset = $~.offset(2).first
when :macro_def
comment = RDoc::Comment.new args[0], @top_level
body = args[1]
offset, = args[2]
find_body class_name, $3, meth_obj, file_content, true
find_body class_name, args[3], meth_obj, file_content, true
comment.normalize
find_modifiers comment, meth_obj
@ -665,11 +693,11 @@ class RDoc::Parser::C < RDoc::Parser
meth_obj.line = file_content[0, offset].count("\n") + 1
body
when %r%^\s*\#\s*define\s+#{meth_name}\s+(\w+)%m then
when :macro_alias
# with no comment we hope the aliased definition has it and use it's
# definition
body = find_body(class_name, $1, meth_obj, file_content, true)
body = find_body(class_name, args[0], meth_obj, file_content, true)
return body if body
@ -764,28 +792,42 @@ class RDoc::Parser::C < RDoc::Parser
class_mod.add_comment comment, @top_level
end
##
# Generate a const table
def gen_const_table file_content
table = {}
@content.scan(%r{
((?>^\s*/\*.*?\*/\s+))
rb_define_(\w+)\((?:\s*(?:\w+),)?\s*
"(\w+)"\s*,
.*?\)\s*;
| Document-(?:const|global|variable):\s
((?:\w+::)*\w+)
\s*?\n((?>.*?\*/))
}mxi) do
case
when $1 then table[[$2, $3]] = $1
when $4 then table[$4] = "/*\n" + $5
end
end
table
end
##
# Finds a comment matching +type+ and +const_name+ either above the
# comment or in the matching Document- section.
def find_const_comment(type, const_name, class_name = nil)
comment = if @content =~ %r%((?>^\s*/\*.*?\*/\s+))
rb_define_#{type}\((?:\s*(\w+),)?\s*
"#{const_name}"\s*,
.*?\)\s*;%xmi then
$1
elsif class_name and
@content =~ %r%Document-(?:const|global|variable):\s
#{class_name}::#{const_name}
\s*?\n((?>.*?\*/))%xm then
"/*\n#{$1}"
elsif @content =~ %r%Document-(?:const|global|variable):
\s#{const_name}
\s*?\n((?>.*?\*/))%xm then
"/*\n#{$1}"
else
@const_table ||= {}
@const_table[@content] ||= gen_const_table @content
table = @const_table[@content]
comment =
table[[type, const_name]] ||
(class_name && table[class_name + "::" + const_name]) ||
table[const_name] ||
''
end
RDoc::Comment.new comment, @top_level
end
@ -841,7 +883,7 @@ class RDoc::Parser::C < RDoc::Parser
comment = find_attr_comment var_name, attr_name
comment.normalize
name = attr_name.gsub(/rb_intern\("([^"]+)"\)/, '\1')
name = attr_name.gsub(/rb_intern(?:_const)?\("([^"]+)"\)/, '\1')
attr = RDoc::Attr.new '', name, rw, comment

Просмотреть файл

@ -102,9 +102,11 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
# Groups +entries+ by date.
def group_entries entries
@time_cache ||= {}
entries.group_by do |title, _|
begin
Time.parse(title).strftime '%Y-%m-%d'
time = @time_cache[title]
(time || Time.parse(title)).strftime '%Y-%m-%d'
rescue NoMethodError, ArgumentError
time, = title.split ' ', 2
Time.parse(time).strftime '%Y-%m-%d'
@ -128,6 +130,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
# 'README.EXT.ja: ditto']]
def parse_entries
@time_cache ||= {}
entries = []
entry_name = nil
entry_body = []
@ -143,6 +146,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
begin
time = Time.parse entry_name
@time_cache[entry_name] = time
# HACK Ruby 1.8 does not raise ArgumentError for Time.parse "Other"
entry_name = nil unless entry_name =~ /#{time.year}/
rescue NoMethodError
@ -185,6 +189,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
# Converts the ChangeLog into an RDoc::Markup::Document
def scan
@time_cache = {}
entries = parse_entries
grouped_entries = group_entries entries

Просмотреть файл

@ -1,8 +1,7 @@
# frozen_string_literal: false
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.12
# from Racc grammar file "".
# This file is automatically generated by Racc 1.4.14
# from Racc grammer file "".
#
require 'racc/parser.rb'
@ -419,53 +418,53 @@ end
##### State transition tables begin ###
racc_action_table = [
34, 35, 30, 33, 14, 73, 38, 33, 76, 15,
88, 34, 35, 30, 33, 40, 34, 35, 30, 33,
40, 65, 34, 35, 30, 33, 14, 73, 77, 14,
54, 15, 34, 35, 30, 33, 14, 9, 10, 11,
12, 15, 34, 35, 30, 33, 14, 73, 81, 54,
38, 15, 34, 35, 30, 33, 14, 73, 40, 67,
83, 15, 34, 35, 30, 33, 14, 73, 54, 30,
35, 15, 34, 35, 30, 33, 34, 47, 36, 14,
59, 15, 34, 35, 30, 33, 14, 73, 38, nil,
34, 35, 30, 33, 40, 34, 35, 30, 33, 40,
65, 34, 35, 30, 33, 14, 73, 14, 54, 76,
15, 88, 34, 35, 30, 33, 14, 73, 77, 33,
54, 15, 34, 35, 30, 33, 14, 73, 81, 38,
38, 15, 34, 35, 30, 33, 14, 73, 40, 36,
83, 15, 34, 35, 30, 33, 54, 47, 30, 35,
34, 15, 34, 35, 30, 33, 14, 73, 38, 67,
59, 15, 34, 35, 30, 33, 14, 9, 10, 11,
12, 15, 34, 35, 30, 33, 14, 73, 14, nil,
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
nil, 15, 34, 35, 30, 33, nil, 47, nil, nil,
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
nil, 15, 34, 35, 30, 33, 14, 9, 10, 11,
12, 15, 34, 35, 30, 33, 14, 73, nil, nil,
nil, 15, 34, 35, 30, 33, 14, 73, 61, 63,
nil, 15, nil, 62, 60, 61, 63, 61, 63, 14,
62, 87, 62, nil, 79, 34, 35, 30, 33 ]
12, 15, 34, 35, 30, 33, 14, 73, 61, 63,
nil, 15, 14, 62, 60, 61, 63, 79, 61, 63,
62, 87, nil, 62, 34, 35, 30, 33 ]
racc_action_check = [
86, 86, 86, 86, 86, 86, 57, 31, 49, 86,
86, 41, 41, 41, 41, 41, 15, 15, 15, 15,
15, 41, 45, 45, 45, 45, 45, 45, 51, 34,
54, 45, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 85, 85, 85, 85, 85, 85, 56, 33,
58, 85, 79, 79, 79, 79, 79, 79, 62, 44,
66, 79, 78, 78, 78, 78, 78, 78, 30, 28,
25, 78, 24, 24, 24, 24, 22, 24, 1, 35,
36, 24, 75, 75, 75, 75, 75, 75, 13, nil,
nil, 75, 27, 27, 27, 27, nil, 27, nil, nil,
41, 41, 41, 41, 41, 15, 15, 15, 15, 15,
41, 86, 86, 86, 86, 86, 86, 34, 33, 49,
86, 86, 85, 85, 85, 85, 85, 85, 51, 31,
54, 85, 79, 79, 79, 79, 79, 79, 56, 57,
58, 79, 78, 78, 78, 78, 78, 78, 62, 1,
66, 78, 24, 24, 24, 24, 30, 24, 28, 25,
22, 24, 75, 75, 75, 75, 75, 75, 13, 44,
36, 75, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 46, 46, 46, 46, 46, 46, 35, nil,
nil, 46, 45, 45, 45, 45, 45, 45, nil, nil,
nil, 45, 27, 27, 27, 27, nil, 27, nil, nil,
nil, 27, 74, 74, 74, 74, 74, 74, nil, nil,
nil, 74, 68, 68, 68, 68, 68, 68, nil, nil,
nil, 68, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 46, 46, 46, 46, 46, 46, nil, nil,
nil, 46, 47, 47, 47, 47, 47, 47, 39, 39,
nil, 47, nil, 39, 39, 82, 82, 64, 64, 52,
82, 82, 64, nil, 52, 20, 20, 20, 20 ]
nil, 68, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 47, 47, 47, 47, 47, 47, 39, 39,
nil, 47, 52, 39, 39, 82, 82, 52, 64, 64,
82, 82, nil, 64, 20, 20, 20, 20 ]
racc_action_pointer = [
29, 78, 119, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, 81, nil, 13, nil, nil, nil, nil,
162, nil, 73, nil, 69, 66, nil, 89, 64, nil,
60, 1, nil, 41, 22, 72, 80, nil, nil, 141,
nil, 8, nil, nil, 46, 19, 129, 139, nil, -5,
nil, 15, 152, nil, 22, nil, 35, -1, 43, nil,
nil, nil, 51, nil, 150, nil, 47, nil, 109, nil,
nil, nil, nil, nil, 99, 79, nil, nil, 59, 49,
nil, nil, 148, nil, nil, 39, -3, nil, nil ]
129, 49, 69, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, 61, nil, 2, nil, nil, nil, nil,
161, nil, 57, nil, 49, 55, nil, 99, 53, nil,
48, 23, nil, 10, 10, 81, 70, nil, nil, 141,
nil, -3, nil, nil, 56, 89, 79, 139, nil, 6,
nil, 15, 145, nil, 22, nil, 25, 32, 33, nil,
nil, nil, 41, nil, 151, nil, 37, nil, 119, nil,
nil, nil, nil, nil, 109, 59, nil, nil, 39, 29,
nil, nil, 148, nil, nil, 19, 8, nil, nil ]
racc_action_default = [
-2, -73, -1, -4, -5, -6, -7, -8, -9, -10,
@ -479,26 +478,26 @@ racc_action_default = [
-60, -47, -73, -29, -52, -48, -73, -20, -50 ]
racc_goto_table = [
4, 39, 4, 68, 74, 75, 5, 6, 5, 6,
51, 42, 44, 56, 3, 49, 37, 57, 58, 41,
43, 48, 84, 50, 66, 55, 1, 64, 84, 84,
45, 46, 42, 45, 46, 2, 85, 86, 80, 84,
4, 39, 4, 68, 74, 75, 6, 5, 6, 5,
44, 42, 51, 49, 3, 56, 37, 57, 58, 80,
2, 66, 84, 41, 43, 48, 50, 64, 84, 84,
46, 45, 42, 46, 45, 55, 85, 86, 1, 84,
84, nil, nil, nil, nil, nil, nil, nil, 82, nil,
nil, nil, 78 ]
racc_goto_check = [
4, 10, 4, 31, 31, 31, 5, 6, 5, 6,
27, 12, 21, 27, 3, 21, 3, 9, 9, 17,
19, 23, 32, 26, 11, 29, 1, 10, 32, 32,
5, 6, 12, 5, 6, 2, 31, 31, 33, 32,
4, 10, 4, 31, 31, 31, 6, 5, 6, 5,
21, 12, 27, 21, 3, 27, 3, 9, 9, 33,
2, 11, 32, 17, 19, 23, 26, 10, 32, 32,
6, 5, 12, 6, 5, 29, 31, 31, 1, 32,
32, nil, nil, nil, nil, nil, nil, nil, 10, nil,
nil, nil, 4 ]
racc_goto_pointer = [
nil, 26, 35, 14, 0, 6, 7, nil, nil, -17,
-14, -17, -9, nil, nil, nil, nil, 4, nil, -2,
nil, -12, nil, -4, nil, nil, -5, -20, nil, -6,
nil, -42, -46, -16 ]
nil, 38, 20, 14, 0, 7, 6, nil, nil, -17,
-14, -20, -9, nil, nil, nil, nil, 8, nil, 2,
nil, -14, nil, 0, nil, nil, -2, -18, nil, 4,
nil, -42, -46, -35 ]
racc_goto_default = [
nil, nil, nil, nil, 70, 71, 72, 7, 8, 13,

Просмотреть файл

@ -1,8 +1,7 @@
# frozen_string_literal: false
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.12
# from Racc grammar file "".
# This file is automatically generated by Racc 1.4.14
# from Racc grammer file "".
#
require 'racc/parser.rb'
@ -244,152 +243,152 @@ end
##### State transition tables begin ###
racc_action_table = [
63, 64, 65, 153, 81, 62, 76, 78, 79, 87,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
77, 80, 152, 63, 64, 65, 61, 81, 62, 76,
78, 79, 124, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 77, 80, 149, 104, 103, 102, 100,
101, 99, 115, 116, 117, 164, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 96, 118, 119, 104,
103, 102, 100, 101, 99, 115, 116, 117, 89, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 88,
104, 103, 102, 100, 101, 99, 115, 116, 117, 86,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
164, 118, 119, 104, 103, 102, 100, 101, 99, 115,
116, 117, 175, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 85, 118, 119, 63, 64, 65, 61,
81, 62, 76, 78, 79, 84, 66, 67, 68, 69,
70, 71, 72, 73, 74, 75, 77, 80, 149, 104,
103, 102, 100, 101, 99, 115, 116, 117, 29, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 173,
118, 119, 104, 103, 102, 100, 101, 99, 115, 116,
117, 161, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 86, 118, 119, 104, 103, 102, 100, 101,
99, 115, 116, 117, 85, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 137, 118, 119, 63, 64,
65, 61, 81, 62, 76, 78, 79, 84, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 77, 80,
22, 23, 24, 25, 26, 21, 18, 19, 176, 177,
13, 173, 14, 154, 15, 175, 16, 137, 17, 42,
148, 20, 54, 38, 53, 55, 56, 57, 29, 13,
177, 14, nil, 15, nil, 16, nil, 17, nil, nil,
117, 137, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 177, 118, 119, 63, 64, 65, 153, 81,
62, 76, 78, 79, 148, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 77, 80, 152, 22, 23,
24, 25, 26, 21, 18, 19, 176, 177, 13, 124,
14, 96, 15, 89, 16, 154, 17, 88, 137, 20,
22, 23, 24, 25, 26, 21, 18, 19, 87, 161,
13, nil, 14, nil, 15, nil, 16, nil, 17, 42,
nil, 20, 54, 38, 53, 55, 56, 57, nil, 13,
nil, 14, nil, 15, nil, 16, nil, 17, nil, nil,
20, 22, 23, 24, 25, 26, 21, 18, 19, nil,
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
nil, nil, 20, 22, 23, 24, 25, 26, 21, 18,
19, nil, nil, 13, nil, 14, nil, 15, nil, 16,
nil, 17, nil, nil, 20, 22, 23, 24, 25, 26,
21, 18, 19, nil, nil, 13, nil, 14, nil, 15,
nil, nil, 20, 63, 64, 65, 61, 81, 62, 76,
78, 79, nil, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 77, 80, 145, nil, nil, 54, 133,
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
nil, 16, nil, 17, 145, nil, 20, 54, 133, 53,
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
15, nil, 16, nil, 17, 145, nil, 20, 54, 133,
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
nil, 16, nil, 17, nil, nil, 20, 22, 23, 24,
25, 26, 21, 18, 19, nil, nil, 13, nil, 14,
nil, 15, nil, 16, nil, 17, 145, nil, 20, 54,
133, 53, 55, 56, 57, nil, 13, nil, 14, nil,
15, nil, 16, nil, 17, 145, nil, 20, 54, 133,
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
nil, 16, nil, 17, nil, nil, 20, 22, 23, 24,
25, 26, 21, 18, 19, nil, nil, 13, nil, 14,
nil, 15, nil, 16, 122, 17, nil, 54, 20, 53,
nil, 16, nil, 17, 145, nil, 20, 54, 133, 53,
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
15, nil, 16, nil, 17, nil, nil, 20, 135, 136,
54, 133, 53, 55, 56, 57, nil, 13, nil, 14,
nil, 15, nil, 16, nil, 17, nil, nil, 20, 135,
136, 54, 133, 53, 55, 56, 57, nil, 13, nil,
15, nil, 16, nil, 17, nil, nil, 20, 22, 23,
24, 25, 26, 21, 18, 19, nil, nil, 13, nil,
14, nil, 15, nil, 16, nil, 17, nil, nil, 20,
135, 136, 54, 133, 53, 55, 56, 57, nil, 13,
22, 23, 24, 25, 26, 21, 18, 19, nil, nil,
13, nil, 14, nil, 15, nil, 16, nil, 17, nil,
nil, 20, 22, 23, 24, 25, 26, 21, 18, 19,
nil, nil, 13, nil, 14, nil, 15, nil, 16, 122,
17, nil, 54, 20, 53, 55, 56, 57, nil, 13,
nil, 14, nil, 15, nil, 16, nil, 17, nil, nil,
20, 172, 135, 136, 54, 133, 53, 55, 56, 57,
165, 135, 136, 54, 133, 53, 55, 56, 57, 95,
nil, nil, 54, 91, 53, 55, 56, 57, 174, 135,
136, 54, 133, 53, 55, 56, 57, 158, nil, nil,
54, nil, 53, 55, 56, 57, 178, 135, 136, 54,
20, 135, 136, 54, 133, 53, 55, 56, 57, nil,
13, nil, 14, nil, 15, nil, 16, nil, 17, nil,
nil, 20, 135, 136, 54, 133, 53, 55, 56, 57,
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
nil, nil, 20, 135, 136, 54, 133, 53, 55, 56,
57, nil, 13, nil, 14, nil, 15, nil, 16, 158,
17, nil, 54, 20, 53, 55, 56, 57, 95, nil,
nil, 54, 91, 53, 55, 56, 57, 145, nil, nil,
54, 133, 53, 55, 56, 57, 165, 135, 136, 54,
133, 53, 55, 56, 57, 145, nil, nil, 54, 133,
53, 55, 56, 57, 145, nil, nil, 54, 133, 53,
55, 56, 57, 135, 136, 54, 133, 53, 55, 56,
53, 55, 56, 57, 172, 135, 136, 54, 133, 53,
55, 56, 57, 174, 135, 136, 54, 133, 53, 55,
56, 57, 178, 135, 136, 54, 133, 53, 55, 56,
57, 135, 136, 54, 133, 53, 55, 56, 57, 135,
136, 54, 133, 53, 55, 56, 57, 22, 23, 24,
25, 26, 21 ]
136, 54, 133, 53, 55, 56, 57, 135, 136, 54,
133, 53, 55, 56, 57, 22, 23, 24, 25, 26,
21 ]
racc_action_check = [
61, 61, 61, 61, 61, 61, 61, 61, 61, 33,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 59, 59, 59, 59, 59, 59, 59,
59, 59, 41, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 97, 97, 97, 97,
97, 97, 97, 97, 97, 125, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 37, 97, 97, 38,
38, 38, 38, 38, 38, 38, 38, 38, 35, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 34,
38, 38, 155, 155, 155, 155, 155, 155, 155, 155,
155, 100, 155, 155, 155, 155, 155, 155, 155, 155,
155, 155, 32, 155, 155, 91, 91, 91, 91, 91,
91, 91, 91, 91, 31, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 43, 91, 91, 20, 20,
20, 20, 20, 20, 20, 20, 20, 29, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
17, 17, 17, 17, 17, 17, 17, 17, 165, 165,
17, 162, 17, 90, 17, 164, 17, 94, 17, 18,
58, 17, 18, 18, 18, 18, 18, 18, 1, 18,
172, 18, nil, 18, nil, 18, nil, 18, nil, nil,
38, 38, 38, 38, 38, 38, 38, 38, 38, 32,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
125, 38, 38, 97, 97, 97, 97, 97, 97, 97,
97, 97, 164, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 31, 97, 97, 59, 59, 59, 59,
59, 59, 59, 59, 59, 29, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 91,
91, 91, 91, 91, 91, 91, 91, 91, 1, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 162,
91, 91, 155, 155, 155, 155, 155, 155, 155, 155,
155, 43, 155, 155, 155, 155, 155, 155, 155, 155,
155, 155, 172, 155, 155, 61, 61, 61, 61, 61,
61, 61, 61, 61, 58, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 16, 16,
16, 16, 16, 16, 16, 16, 165, 165, 16, 41,
16, 37, 16, 35, 16, 90, 16, 34, 94, 16,
17, 17, 17, 17, 17, 17, 17, 17, 33, 100,
17, nil, 17, nil, 17, nil, 17, nil, 17, 18,
nil, 17, 18, 18, 18, 18, 18, 18, nil, 18,
nil, 18, nil, 18, nil, 18, nil, 18, nil, nil,
18, 19, 19, 19, 19, 19, 19, 19, 19, nil,
nil, 19, nil, 19, nil, 19, nil, 19, nil, 19,
nil, nil, 19, 16, 16, 16, 16, 16, 16, 16,
16, nil, nil, 16, nil, 16, nil, 16, nil, 16,
nil, 16, nil, nil, 16, 15, 15, 15, 15, 15,
15, 15, 15, nil, nil, 15, nil, 15, nil, 15,
nil, 15, nil, 15, 45, nil, 15, 45, 45, 45,
45, 45, 45, nil, 45, nil, 45, nil, 45, nil,
45, nil, 45, nil, nil, 45, 14, 14, 14, 14,
14, 14, 14, 14, nil, nil, 14, nil, 14, nil,
14, nil, 14, nil, 14, 146, nil, 14, 146, 146,
nil, nil, 19, 20, 20, 20, 20, 20, 20, 20,
20, 20, nil, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 146, nil, nil, 146, 146,
146, 146, 146, 146, nil, 146, nil, 146, nil, 146,
nil, 146, nil, 146, nil, nil, 146, 13, 13, 13,
13, 13, 13, 13, 13, nil, nil, 13, nil, 13,
nil, 13, nil, 13, nil, 13, 138, nil, 13, 138,
138, 138, 138, 138, 138, nil, 138, nil, 138, nil,
138, nil, 138, nil, 138, 44, nil, 138, 44, 44,
44, 44, 44, 44, nil, 44, nil, 44, nil, 44,
nil, 44, nil, 44, nil, nil, 44, 2, 2, 2,
2, 2, 2, 2, 2, nil, nil, 2, nil, 2,
nil, 2, nil, 2, 39, 2, nil, 39, 2, 39,
39, 39, 39, nil, 39, nil, 39, nil, 39, nil,
39, nil, 39, nil, nil, 39, 0, 0, 0, 0,
nil, 146, nil, 146, 138, nil, 146, 138, 138, 138,
138, 138, 138, nil, 138, nil, 138, nil, 138, nil,
138, nil, 138, nil, nil, 138, 0, 0, 0, 0,
0, 0, 0, 0, nil, nil, 0, nil, 0, nil,
0, nil, 0, nil, 0, nil, nil, 0, 122, 122,
122, 122, 122, 122, 122, 122, nil, 122, nil, 122,
nil, 122, nil, 122, nil, 122, nil, nil, 122, 127,
127, 127, 127, 127, 127, 127, 127, nil, 127, nil,
127, nil, 127, nil, 127, nil, 127, nil, nil, 127,
42, 42, 42, 42, 42, 42, 42, 42, nil, 42,
nil, 42, nil, 42, nil, 42, nil, 42, nil, nil,
42, 159, 159, 159, 159, 159, 159, 159, 159, 159,
126, 126, 126, 126, 126, 126, 126, 126, 126, 36,
nil, nil, 36, 36, 36, 36, 36, 36, 163, 163,
163, 163, 163, 163, 163, 163, 163, 92, nil, nil,
92, nil, 92, 92, 92, 92, 171, 171, 171, 171,
171, 171, 171, 171, 171, 142, nil, nil, 142, 142,
142, 142, 142, 142, 52, nil, nil, 52, 52, 52,
52, 52, 52, 95, 95, 95, 95, 95, 95, 95,
95, 168, 168, 168, 168, 168, 168, 168, 168, 158,
158, 158, 158, 158, 158, 158, 158, 27, 27, 27,
27, 27, 27 ]
0, nil, 0, nil, 0, 45, nil, 0, 45, 45,
45, 45, 45, 45, nil, 45, nil, 45, nil, 45,
nil, 45, nil, 45, 44, nil, 45, 44, 44, 44,
44, 44, 44, nil, 44, nil, 44, nil, 44, nil,
44, nil, 44, nil, nil, 44, 2, 2, 2, 2,
2, 2, 2, 2, nil, nil, 2, nil, 2, nil,
2, nil, 2, nil, 2, nil, nil, 2, 13, 13,
13, 13, 13, 13, 13, 13, nil, nil, 13, nil,
13, nil, 13, nil, 13, nil, 13, nil, nil, 13,
14, 14, 14, 14, 14, 14, 14, 14, nil, nil,
14, nil, 14, nil, 14, nil, 14, nil, 14, nil,
nil, 14, 15, 15, 15, 15, 15, 15, 15, 15,
nil, nil, 15, nil, 15, nil, 15, nil, 15, 39,
15, nil, 39, 15, 39, 39, 39, 39, nil, 39,
nil, 39, nil, 39, nil, 39, nil, 39, nil, nil,
39, 42, 42, 42, 42, 42, 42, 42, 42, nil,
42, nil, 42, nil, 42, nil, 42, nil, 42, nil,
nil, 42, 127, 127, 127, 127, 127, 127, 127, 127,
nil, 127, nil, 127, nil, 127, nil, 127, nil, 127,
nil, nil, 127, 122, 122, 122, 122, 122, 122, 122,
122, nil, 122, nil, 122, nil, 122, nil, 122, 92,
122, nil, 92, 122, 92, 92, 92, 92, 36, nil,
nil, 36, 36, 36, 36, 36, 36, 52, nil, nil,
52, 52, 52, 52, 52, 52, 126, 126, 126, 126,
126, 126, 126, 126, 126, 142, nil, nil, 142, 142,
142, 142, 142, 142, 159, 159, 159, 159, 159, 159,
159, 159, 159, 163, 163, 163, 163, 163, 163, 163,
163, 163, 171, 171, 171, 171, 171, 171, 171, 171,
171, 95, 95, 95, 95, 95, 95, 95, 95, 158,
158, 158, 158, 158, 158, 158, 158, 168, 168, 168,
168, 168, 168, 168, 168, 27, 27, 27, 27, 27,
27 ]
racc_action_pointer = [
423, 188, 384, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, 324, 283, 242, 220, 157, 176, 198,
135, nil, nil, nil, nil, nil, nil, 604, nil, 147,
nil, 110, 96, -9, 69, 56, 526, 43, 66, 401,
nil, 28, 486, 130, 362, 261, nil, nil, nil, nil,
nil, nil, 571, nil, nil, nil, nil, nil, 169, 20,
nil, -3, nil, nil, nil, nil, nil, nil, nil, nil,
283, 78, 343, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, 365, 387, 409, 135, 157, 176, 198,
220, nil, nil, nil, nil, nil, nil, 602, nil, 55,
nil, 29, -7, 150, 137, 131, 515, 128, -3, 426,
nil, 145, 447, 96, 321, 302, nil, nil, nil, nil,
nil, nil, 524, nil, nil, nil, nil, nil, 113, 43,
nil, 112, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
150, 112, 544, nil, 172, 579, nil, 43, nil, nil,
95, nil, nil, nil, nil, nil, nil, nil, nil, nil,
132, 66, 506, nil, 153, 577, nil, 20, nil, nil,
163, nil, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, 444, nil, nil, 52, 517, 465, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, 343, nil,
nil, nil, 562, nil, nil, nil, 302, nil, nil, nil,
nil, nil, nil, nil, nil, 89, nil, nil, 595, 508,
nil, nil, 168, 535, 171, 164, nil, nil, 587, nil,
nil, 553, 185, nil, nil, nil, nil, nil, nil ]
nil, nil, 489, nil, nil, 17, 533, 468, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, 261, nil,
nil, nil, 542, nil, nil, nil, 242, nil, nil, nil,
nil, nil, nil, nil, nil, 89, nil, nil, 585, 551,
nil, nil, 86, 560, 28, 142, nil, nil, 593, nil,
nil, 569, 107, nil, nil, nil, nil, nil, nil ]
racc_action_default = [
-138, -138, -1, -3, -4, -5, -6, -7, -8, -9,
@ -412,47 +411,47 @@ racc_action_default = [
-60, -138, -34, -36, -37, -29, -30, -32, -34 ]
racc_goto_table = [
126, 44, 125, 43, 144, 144, 160, 93, 97, 52,
166, 82, 144, 41, 40, 39, 138, 146, 169, 147,
167, 94, 44, 1, 123, 129, 169, 52, 36, 37,
52, 90, 59, 92, 121, 120, 31, 32, 33, 34,
35, 170, 58, 166, 83, 30, 170, 166, 151, nil,
150, nil, 166, 159, 8, 166, 8, nil, nil, nil,
nil, 155, nil, 156, 160, nil, nil, 8, 8, 8,
8, 8, nil, 8, 4, nil, 4, 157, nil, nil,
163, nil, 162, 52, nil, 168, nil, 4, 4, 4,
4, 4, nil, 4, nil, nil, nil, nil, 144, nil,
nil, nil, 144, nil, nil, 129, 144, 144, nil, 5,
129, 5, nil, nil, nil, nil, 171, 6, nil, 6,
nil, nil, 5, 5, 5, 5, 5, 11, 5, 11,
6, 6, 6, 6, 6, 7, 6, 7, nil, nil,
11, 11, 11, 11, 11, nil, 11, nil, 7, 7,
7, 7, 7, nil, 7 ]
126, 44, 125, 52, 144, 144, 160, 93, 97, 43,
166, 82, 144, 40, 41, 39, 138, 146, 169, 90,
36, 52, 44, 1, 52, 129, 169, 94, 59, 83,
123, 30, 151, 92, 120, 121, 31, 32, 33, 34,
35, 170, 58, 166, 167, 147, 170, 166, 37, nil,
150, nil, 166, 159, 4, 166, 4, nil, nil, nil,
nil, 155, nil, 156, 160, nil, nil, 4, 4, 4,
4, 4, nil, 4, 5, nil, 5, 52, nil, nil,
163, nil, 162, 157, nil, 168, nil, 5, 5, 5,
5, 5, nil, 5, nil, nil, nil, nil, 144, nil,
nil, nil, 144, nil, nil, 129, 144, 144, nil, 6,
129, 6, nil, nil, nil, nil, 171, 7, nil, 7,
nil, nil, 6, 6, 6, 6, 6, 8, 6, 8,
7, 7, 7, 7, 7, 11, 7, 11, nil, nil,
8, 8, 8, 8, 8, nil, 8, nil, 11, 11,
11, 11, 11, nil, 11 ]
racc_goto_check = [
22, 24, 21, 23, 36, 36, 37, 18, 16, 34,
35, 41, 36, 20, 19, 17, 25, 25, 28, 32,
29, 23, 24, 1, 23, 24, 28, 34, 13, 15,
34, 14, 38, 17, 20, 19, 1, 1, 1, 1,
1, 33, 1, 35, 39, 3, 33, 35, 42, nil,
41, nil, 35, 22, 8, 35, 8, nil, nil, nil,
nil, 16, nil, 18, 37, nil, nil, 8, 8, 8,
8, 8, nil, 8, 4, nil, 4, 23, nil, nil,
22, nil, 21, 34, nil, 22, nil, 4, 4, 4,
4, 4, nil, 4, nil, nil, nil, nil, 36, nil,
nil, nil, 36, nil, nil, 24, 36, 36, nil, 5,
24, 5, nil, nil, nil, nil, 22, 6, nil, 6,
nil, nil, 5, 5, 5, 5, 5, 11, 5, 11,
6, 6, 6, 6, 6, 7, 6, 7, nil, nil,
11, 11, 11, 11, 11, nil, 11, nil, 7, 7,
7, 7, 7, nil, 7 ]
22, 24, 21, 34, 36, 36, 37, 18, 16, 23,
35, 41, 36, 19, 20, 17, 25, 25, 28, 14,
13, 34, 24, 1, 34, 24, 28, 23, 38, 39,
23, 3, 42, 17, 19, 20, 1, 1, 1, 1,
1, 33, 1, 35, 29, 32, 33, 35, 15, nil,
41, nil, 35, 22, 4, 35, 4, nil, nil, nil,
nil, 16, nil, 18, 37, nil, nil, 4, 4, 4,
4, 4, nil, 4, 5, nil, 5, 34, nil, nil,
22, nil, 21, 23, nil, 22, nil, 5, 5, 5,
5, 5, nil, 5, nil, nil, nil, nil, 36, nil,
nil, nil, 36, nil, nil, 24, 36, 36, nil, 6,
24, 6, nil, nil, nil, nil, 22, 7, nil, 7,
nil, nil, 6, 6, 6, 6, 6, 8, 6, 8,
7, 7, 7, 7, 7, 11, 7, 11, nil, nil,
8, 8, 8, 8, 8, nil, 8, nil, 11, 11,
11, 11, 11, nil, 11 ]
racc_goto_pointer = [
nil, 23, nil, 43, 74, 109, 117, 135, 54, nil,
nil, 127, nil, 10, -5, 11, -30, -3, -29, -4,
-5, -40, -42, -15, -17, -28, nil, nil, -120, -107,
nil, nil, -33, -101, -9, -116, -40, -91, 12, 17,
nil, -9, -13 ]
nil, 23, nil, 29, 54, 74, 109, 117, 127, nil,
nil, 135, nil, 2, -17, 30, -30, -3, -29, -5,
-4, -40, -42, -9, -17, -28, nil, nil, -120, -83,
nil, nil, -7, -101, -15, -116, -40, -91, 8, 2,
nil, -9, -29 ]
racc_goto_default = [
nil, nil, 2, 3, 46, 47, 48, 49, 50, 9,

Просмотреть файл

@ -1,7 +1,66 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require 'rdoc'
Gem::Specification.new do |s|
s.name = "rdoc"
s.version = "4.2.1"
s.summary = "This rdoc is bundled with Ruby"
s.version = RDoc::VERSION
s.required_rubygems_version = Gem::Requirement.new(">= 1.3") if
s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = [
"Eric Hodel",
"Dave Thomas",
"Phil Hagelberg",
"Tony Strauss",
"Zachary Scott"
]
s.description = <<-DESCRIPTION
RDoc produces HTML and command-line documentation for Ruby projects.
RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
DESCRIPTION
s.email = ["drbrain@segment7.net", "mail@zzak.io"]
s.executables = ["rdoc", "ri"]
s.files = ["rdoc.rb", "rdoc/alias.rb", "rdoc/anon_class.rb", "rdoc/any_method.rb", "rdoc/attr.rb", "rdoc/class_module.rb", "rdoc/code_object.rb", "rdoc/code_objects.rb", "rdoc/comment.rb", "rdoc/constant.rb", "rdoc/context.rb", "rdoc/context/section.rb", "rdoc/cross_reference.rb", "rdoc/encoding.rb", "rdoc/erb_partial.rb", "rdoc/erbio.rb", "rdoc/extend.rb", "rdoc/generator.rb", "rdoc/generator/darkfish.rb", "rdoc/generator/json_index.rb", "rdoc/generator/markup.rb", "rdoc/generator/pot.rb", "rdoc/generator/pot/message_extractor.rb", "rdoc/generator/pot/po.rb", "rdoc/generator/pot/po_entry.rb", "rdoc/generator/ri.rb", "rdoc/ghost_method.rb", "rdoc/i18n.rb", "rdoc/i18n/locale.rb", "rdoc/i18n/text.rb", "rdoc/include.rb", "rdoc/known_classes.rb", "rdoc/markdown.rb", "rdoc/markdown/entities.rb", "rdoc/markdown/literals_1_9.rb", "rdoc/markup.rb", "rdoc/markup/attr_changer.rb", "rdoc/markup/attr_span.rb", "rdoc/markup/attribute_manager.rb", "rdoc/markup/attributes.rb", "rdoc/markup/blank_line.rb", "rdoc/markup/block_quote.rb", "rdoc/markup/document.rb", "rdoc/markup/formatter.rb", "rdoc/markup/formatter_test_case.rb", "rdoc/markup/hard_break.rb", "rdoc/markup/heading.rb", "rdoc/markup/include.rb", "rdoc/markup/indented_paragraph.rb", "rdoc/markup/inline.rb", "rdoc/markup/list.rb", "rdoc/markup/list_item.rb", "rdoc/markup/paragraph.rb", "rdoc/markup/parser.rb", "rdoc/markup/pre_process.rb", "rdoc/markup/raw.rb", "rdoc/markup/rule.rb", "rdoc/markup/special.rb", "rdoc/markup/text_formatter_test_case.rb", "rdoc/markup/to_ansi.rb", "rdoc/markup/to_bs.rb", "rdoc/markup/to_html.rb", "rdoc/markup/to_html_crossref.rb", "rdoc/markup/to_html_snippet.rb", "rdoc/markup/to_joined_paragraph.rb", "rdoc/markup/to_label.rb", "rdoc/markup/to_markdown.rb", "rdoc/markup/to_rdoc.rb", "rdoc/markup/to_table_of_contents.rb", "rdoc/markup/to_test.rb", "rdoc/markup/to_tt_only.rb", "rdoc/markup/verbatim.rb", "rdoc/meta_method.rb", "rdoc/method_attr.rb", "rdoc/mixin.rb", "rdoc/normal_class.rb", "rdoc/normal_module.rb", "rdoc/options.rb", "rdoc/parser.rb", "rdoc/parser/c.rb", "rdoc/parser/changelog.rb", "rdoc/parser/markdown.rb", "rdoc/parser/rd.rb", "rdoc/parser/ruby.rb", "rdoc/parser/ruby_tools.rb", "rdoc/parser/simple.rb", "rdoc/parser/text.rb", "rdoc/rd.rb", "rdoc/rd/block_parser.rb", "rdoc/rd/inline.rb", "rdoc/rd/inline_parser.rb", "rdoc/rdoc.rb", "rdoc/require.rb", "rdoc/ri.rb", "rdoc/ri/driver.rb", "rdoc/ri/formatter.rb", "rdoc/ri/paths.rb", "rdoc/ri/store.rb", "rdoc/ri/task.rb", "rdoc/ruby_lex.rb", "rdoc/ruby_token.rb", "rdoc/rubygems_hook.rb", "rdoc/servlet.rb", "rdoc/single_class.rb", "rdoc/stats.rb", "rdoc/stats/normal.rb", "rdoc/stats/quiet.rb", "rdoc/stats/verbose.rb", "rdoc/store.rb", "rdoc/task.rb", "rdoc/test_case.rb", "rdoc/text.rb", "rdoc/token_stream.rb", "rdoc/tom_doc.rb", "rdoc/top_level.rb"]
s.extra_rdoc_files += %w[
CVE-2013-0256.rdoc
CONTRIBUTING.rdoc
ExampleMarkdown.md
ExampleRDoc.rdoc
History.rdoc
LEGAL.rdoc
LICENSE.rdoc
README.rdoc
RI.rdoc
TODO.rdoc
]
s.files = File.readlines("Manifest.txt").map { |l| l.gsub("\n",'') }
s.homepage = "http://docs.seattlerb.org/rdoc"
s.licenses = ["Ruby"]
s.post_install_message = <<-MESSAGE
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
MESSAGE
s.rdoc_options = ["--main", "README.rdoc"]
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
s.rubygems_version = "2.5.2"
s.summary = "RDoc produces HTML and command-line documentation for Ruby projects"
s.add_runtime_dependency("json", "~> 1.4")
s.add_development_dependency("rake", "~> 10.5")
s.add_development_dependency("racc", "~> 1.4", "> 1.4.10")
s.add_development_dependency("kpeg", "~> 0.9")
s.add_development_dependency("minitest", "~> 4")
end

Просмотреть файл

@ -437,7 +437,7 @@ The internal error was:
def remove_unparseable files
files.reject do |file|
file =~ /\.(?:class|eps|erb|scpt\.txt|ttf|yml)$/i or
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
(file =~ /tags$/i and
open(file, 'rb') { |io|
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/

Просмотреть файл

@ -907,22 +907,9 @@ The ri pager can be set with the 'RI_PAGER' environment variable or the
# will be expanded to Zlib::DataError.
def expand_class klass
klass.split('::').inject '' do |expanded, klass_part|
expanded << '::' unless expanded.empty?
short = expanded << klass_part
subset = classes.keys.select do |klass_name|
klass_name =~ /^#{expanded}[^:]*$/
end
abbrevs = Abbrev.abbrev subset
expanded = abbrevs[short]
raise NotFoundError, short unless expanded
expanded.dup
end
ary = classes.keys.grep(Regexp.new("\\A#{klass.gsub(/(?=::|\z)/, '[^:]*')}\\z"))
raise NotFoundError, klass if ary.length != 1
ary.first
end
##

Просмотреть файл

@ -102,10 +102,10 @@ class RDoc::RubyLex
@exp_line_no = @line_no = 1
@here_readed = []
@readed = []
@current_readed = @readed
@rests = []
@seek = 0
@here_header = false
@indent = 0
@indent_stack = []
@lex_state = :EXPR_BEG
@ -161,7 +161,7 @@ class RDoc::RubyLex
end
readed = @readed.join("")
@readed = []
@readed.clear
readed
end
@ -171,13 +171,9 @@ class RDoc::RubyLex
@rests.push nil unless buf_input
end
c = @rests.shift
if @here_header
@here_readed.push c
else
@readed.push c
end
@current_readed.push c
@seek += 1
if c == "\n"
if c == "\n".freeze
@line_no += 1
@char_no = 0
else
@ -283,7 +279,7 @@ class RDoc::RubyLex
@indent_stack = []
@lex_state = :EXPR_BEG
@space_seen = false
@here_header = false
@current_readed = @readed
@continue = false
prompt
@ -462,8 +458,8 @@ class RDoc::RubyLex
@indent_stack.pop
end
end
@here_header = false
@here_readed = []
@current_readed = @readed
@here_readed.clear
Token(TkNL)
end
@ -1021,7 +1017,7 @@ class RDoc::RubyLex
doc = '"'
end
@here_header = false
@current_readed = @readed
while l = gets
l = l.sub(/(:?\r)?\n\z/, "\n")
if (indent ? l.strip : l.chomp) == quoted
@ -1038,7 +1034,7 @@ class RDoc::RubyLex
doc << '"'
end
@here_header = true
@current_readed = @here_readed
@here_readed.concat reserve
while ch = reserve.pop
ungetc ch

Просмотреть файл

@ -116,8 +116,8 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
case req.path
when '/' then
root req, res
when '/rdoc.css', '/js/darkfish.js', '/js/jquery.js', '/js/search.js',
%r%^/images/% then
when '/js/darkfish.js', '/js/jquery.js', '/js/search.js',
%r%^/css/%, %r%^/images/%, %r%^/fonts/% then
asset :darkfish, req, res
when '/js/navigation.js', '/js/searcher.js' then
asset :json_index, req, res
@ -204,7 +204,7 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
<title>Error - #{ERB::Util.html_escape exception.class}</title>
<link type="text/css" media="screen" href="#{@mount_path}/rdoc.css" rel="stylesheet">
<link type="text/css" media="screen" href="#{@mount_path}/css/rdoc.css" rel="stylesheet">
</head>
<body>
<h1>Error</h1>

Просмотреть файл

@ -417,7 +417,7 @@ class TestRDocContext < XrefTestCase
def bench_add_include
cm = RDoc::ClassModule.new 'Klass'
assert_performance_linear 0.9 do |count|
assert_performance_linear 0.5 do |count|
count.times do |i|
cm.add_include RDoc::Include.new("N::M#{i}", nil)
end

Просмотреть файл

@ -48,6 +48,22 @@ class TestRDocContextSection < RDoc::TestCase
assert_equal 'one+two', @S.new(nil, 'one two', nil).aref
end
def test_eql_eh
other = @S.new @klass, 'other', comment('# comment', @top_level)
assert @s.eql? @s
assert @s.eql? @s.dup
refute @s.eql? other
end
def test_equals
other = @S.new @klass, 'other', comment('# comment', @top_level)
assert_equal @s, @s
assert_equal @s, @s.dup
refute_equal @s, other
end
def test_extract_comment
assert_equal '', @s.extract_comment(comment('')).text
assert_equal '', @s.extract_comment(comment("# :section: b\n")).text
@ -56,6 +72,14 @@ class TestRDocContextSection < RDoc::TestCase
@s.extract_comment(comment("# a\n# :section: b\n# c")).text
end
def test_hash
other = @S.new @klass, 'other', comment('# comment', @top_level)
assert_equal @s.hash, @s.hash
assert_equal @s.hash, @s.dup.hash
refute_equal @s.hash, other.hash
end
def test_marshal_dump
loaded = Marshal.load Marshal.dump @s

Просмотреть файл

@ -217,6 +217,45 @@ class TestRDocEncoding < RDoc::TestCase
end
end
def test_skip_frozen_string_literal
skip "Encoding not implemented" unless Object.const_defined? :Encoding
expected = "# frozen_string_literal: false\nhi everybody"
@tempfile.write expected
@tempfile.flush
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
assert_equal "hi everybody", contents
assert_equal Encoding::UTF_8, contents.encoding
end
def test_skip_frozen_string_literal_after_coding
skip "Encoding not implemented" unless Object.const_defined? :Encoding
expected = "# coding: utf-8\n# frozen-string-literal: false\nhi everybody"
@tempfile.write expected
@tempfile.flush
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
assert_equal "hi everybody", contents
assert_equal Encoding::UTF_8, contents.encoding
end
def test_skip_frozen_string_literal_before_coding
skip "Encoding not implemented" unless Object.const_defined? :Encoding
expected = "# frozen_string_literal: false\n# coding: utf-8\nhi everybody"
@tempfile.write expected
@tempfile.flush
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
assert_equal "hi everybody", contents
assert_equal Encoding::UTF_8, contents.encoding
end
def test_sanity
skip "Encoding not implemented" unless Object.const_defined? :Encoding

Просмотреть файл

@ -44,6 +44,12 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
assert_equal para("<a href=\"C1.html#Section\">Section at C1</a>"), result
end
def test_convert_CROSSREF_constant
result = @to.convert 'C1::CONST'
assert_equal para("<a href=\"C1.html#CONST\">C1::CONST</a>"), result
end
def test_convert_RDOCLINK_rdoc_ref
result = @to.convert 'rdoc-ref:C1'

Просмотреть файл

@ -176,6 +176,50 @@ void Init_Blah(void) {
assert_equal 'This is a writer', writer.comment.text
end
def test_do_attr_rb_attr_2
content = <<-EOF
void Init_Blah(void) {
cBlah = rb_define_class("Blah", rb_cObject);
/*
* This is an accessor
*/
rb_attr(cBlah, rb_intern_const("accessor"), 1, 1, Qfalse);
/*
* This is a reader
*/
rb_attr(cBlah, rb_intern_const("reader"), 1, 0, Qfalse);
/*
* This is a writer
*/
rb_attr(cBlah, rb_intern_const("writer"), 0, 1, Qfalse);
}
EOF
klass = util_get_class content, 'cBlah'
attrs = klass.attributes
assert_equal 3, attrs.length, attrs.inspect
accessor = attrs.shift
assert_equal 'accessor', accessor.name
assert_equal 'RW', accessor.rw
assert_equal 'This is an accessor', accessor.comment.text
assert_equal @top_level, accessor.file
reader = attrs.shift
assert_equal 'reader', reader.name
assert_equal 'R', reader.rw
assert_equal 'This is a reader', reader.comment.text
writer = attrs.shift
assert_equal 'writer', writer.name
assert_equal 'W', writer.rw
assert_equal 'This is a writer', writer.comment.text
end
def test_do_attr_rb_define_attr
content = <<-EOF
void Init_Blah(void) {

Просмотреть файл

@ -300,6 +300,7 @@ class TestRDocRDoc < RDoc::TestCase
blah.eps
blah.erb
blah.scpt.txt
blah.svg
blah.ttf
blah.yml
]

Просмотреть файл

@ -834,6 +834,24 @@ Foo::Bar#bother
end
end
def test_expand_class_2
@store1 = RDoc::RI::Store.new @home_ri, :home
@top_level = @store1.add_file 'file.rb'
@cFoo = @top_level.add_class RDoc::NormalClass, 'Foo'
@mFox = @top_level.add_module RDoc::NormalModule, 'Fox'
@cFoo_Bar = @cFoo.add_class RDoc::NormalClass, 'Bar'
@store1.save
@driver.stores = [@store1]
assert_raises RDoc::RI::Driver::NotFoundError do
@driver.expand_class 'F'
end
assert_equal 'Foo::Bar', @driver.expand_class('F::Bar')
assert_equal 'Foo::Bar', @driver.expand_class('F::B')
end
def test_expand_name
util_store

Просмотреть файл

@ -66,14 +66,15 @@ class TestRDocServlet < RDoc::TestCase
def test_asset
temp_dir do
now = Time.now
FileUtils.mkdir 'css'
open 'rdoc.css', 'w' do |io| io.write 'h1 { color: red }' end
File.utime now, now, 'rdoc.css'
now = Time.now
open 'css/rdoc.css', 'w' do |io| io.write 'h1 { color: red }' end
File.utime now, now, 'css/rdoc.css'
@s.asset_dirs[:darkfish] = '.'
@req.path = 'rdoc.css'
@req.path = '/css/rdoc.css'
@s.asset :darkfish, @req, @res
@ -95,11 +96,12 @@ class TestRDocServlet < RDoc::TestCase
def test_do_GET_asset_darkfish
temp_dir do
FileUtils.touch 'rdoc.css'
FileUtils.mkdir 'css'
FileUtils.touch 'css/rdoc.css'
@s.asset_dirs[:darkfish] = '.'
@req.path = '/rdoc.css'
@req.path = '/css/rdoc.css'
@s.do_GET @req, @res
@ -136,11 +138,12 @@ class TestRDocServlet < RDoc::TestCase
@s = RDoc::Servlet.new @server, @stores, @cache, '/mount/path'
temp_dir do
FileUtils.touch 'rdoc.css'
FileUtils.mkdir 'css'
FileUtils.touch 'css/rdoc.css'
@s.asset_dirs[:darkfish] = '.'
@req.path = '/mount/path/rdoc.css'
@req.path = '/mount/path/css/rdoc.css'
@s.do_GET @req, @res