Skip to content

Commit 14e5fee

Browse files
authored
Merge pull request #685 from aycabta/merge-ruby's-doc-fix
Merge Ruby's fixed doc
2 parents b9bb178 + ca50871 commit 14e5fee

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

lib/rdoc/parser/c.rb

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
##
55
# RDoc::Parser::C attempts to parse C extension files. It looks for
6-
# the standard patterns that you find in extensions: <tt>rb_define_class,
7-
# rb_define_method</tt> and so on. It tries to find the corresponding
6+
# the standard patterns that you find in extensions: +rb_define_class+,
7+
# +rb_define_method+ and so on. It tries to find the corresponding
88
# C source for the methods and extract comments, but if we fail
99
# we don't worry too much.
1010
#
1111
# The comments associated with a Ruby method are extracted from the C
1212
# comment block associated with the routine that _implements_ that
1313
# method, that is to say the method whose name is given in the
14-
# <tt>rb_define_method</tt> call. For example, you might write:
14+
# +rb_define_method+ call. For example, you might write:
1515
#
1616
# /*
1717
# * Returns a new array that is a one-dimensional flattening of this
@@ -24,8 +24,7 @@
2424
# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
2525
# */
2626
# static VALUE
27-
# rb_ary_flatten(ary)
28-
# VALUE ary;
27+
# rb_ary_flatten(VALUE ary)
2928
# {
3029
# ary = rb_obj_dup(ary);
3130
# rb_ary_flatten_bang(ary);
@@ -35,16 +34,16 @@
3534
# ...
3635
#
3736
# void
38-
# Init_Array()
37+
# Init_Array(void)
3938
# {
4039
# ...
4140
# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
4241
#
43-
# Here RDoc will determine from the rb_define_method line that there's a
42+
# Here RDoc will determine from the +rb_define_method+ line that there's a
4443
# method called "flatten" in class Array, and will look for the implementation
45-
# in the method rb_ary_flatten. It will then use the comment from that
44+
# in the method +rb_ary_flatten+. It will then use the comment from that
4645
# method in the HTML output. This method must be in the same source file
47-
# as the rb_define_method.
46+
# as the +rb_define_method+.
4847
#
4948
# The comment blocks may include special directives:
5049
#
@@ -70,15 +69,15 @@
7069
# [Document-variable: +name+]
7170
# Documentation for the named +rb_define_variable+
7271
#
73-
# [Document-method: +method_name+]
72+
# [Document-method\: +method_name+]
7473
# Documentation for the named method. Use this when the method name is
7574
# unambiguous.
7675
#
77-
# [Document-method: <tt>ClassName::method_name<tt>]
76+
# [Document-method\: <tt>ClassName::method_name</tt>]
7877
# Documentation for a singleton method in the given class. Use this when
7978
# the method name alone is ambiguous.
8079
#
81-
# [Document-method: <tt>ClassName#method_name<tt>]
80+
# [Document-method\: <tt>ClassName#method_name</tt>]
8281
# Documentation for a instance method in the given class. Use this when the
8382
# method name alone is ambiguous.
8483
#
@@ -1266,4 +1265,3 @@ def scan
12661265
end
12671266

12681267
end
1269-

lib/rdoc/rdoc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# rdoc.document argv
2525
#
2626
# Where +argv+ is an array of strings, each corresponding to an argument you'd
27-
# give rdoc on the command line. See <tt>rdoc --help<tt> for details.
27+
# give rdoc on the command line. See <tt>rdoc --help</tt> for details.
2828

2929
class RDoc::RDoc
3030

lib/rdoc/task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class RDoc::Task < Rake::TaskLib
128128
attr_accessor :template
129129

130130
##
131-
# Name of format generator (<tt>--format<tt>) used by rdoc. (defaults to
131+
# Name of format generator (<tt>--format</tt>) used by rdoc. (defaults to
132132
# rdoc's default)
133133

134134
attr_accessor :generator

0 commit comments

Comments
 (0)