|
3 | 3 |
|
4 | 4 | ##
|
5 | 5 | # 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 |
8 | 8 | # C source for the methods and extract comments, but if we fail
|
9 | 9 | # we don't worry too much.
|
10 | 10 | #
|
11 | 11 | # The comments associated with a Ruby method are extracted from the C
|
12 | 12 | # comment block associated with the routine that _implements_ that
|
13 | 13 | # 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: |
15 | 15 | #
|
16 | 16 | # /*
|
17 | 17 | # * Returns a new array that is a one-dimensional flattening of this
|
|
24 | 24 | # * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
25 | 25 | # */
|
26 | 26 | # static VALUE
|
27 |
| -# rb_ary_flatten(ary) |
28 |
| -# VALUE ary; |
| 27 | +# rb_ary_flatten(VALUE ary) |
29 | 28 | # {
|
30 | 29 | # ary = rb_obj_dup(ary);
|
31 | 30 | # rb_ary_flatten_bang(ary);
|
|
35 | 34 | # ...
|
36 | 35 | #
|
37 | 36 | # void
|
38 |
| -# Init_Array() |
| 37 | +# Init_Array(void) |
39 | 38 | # {
|
40 | 39 | # ...
|
41 | 40 | # rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
|
42 | 41 | #
|
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 |
44 | 43 | # 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 |
46 | 45 | # 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+. |
48 | 47 | #
|
49 | 48 | # The comment blocks may include special directives:
|
50 | 49 | #
|
|
70 | 69 | # [Document-variable: +name+]
|
71 | 70 | # Documentation for the named +rb_define_variable+
|
72 | 71 | #
|
73 |
| -# [Document-method: +method_name+] |
| 72 | +# [Document-method\: +method_name+] |
74 | 73 | # Documentation for the named method. Use this when the method name is
|
75 | 74 | # unambiguous.
|
76 | 75 | #
|
77 |
| -# [Document-method: <tt>ClassName::method_name<tt>] |
| 76 | +# [Document-method\: <tt>ClassName::method_name</tt>] |
78 | 77 | # Documentation for a singleton method in the given class. Use this when
|
79 | 78 | # the method name alone is ambiguous.
|
80 | 79 | #
|
81 |
| -# [Document-method: <tt>ClassName#method_name<tt>] |
| 80 | +# [Document-method\: <tt>ClassName#method_name</tt>] |
82 | 81 | # Documentation for a instance method in the given class. Use this when the
|
83 | 82 | # method name alone is ambiguous.
|
84 | 83 | #
|
@@ -1266,4 +1265,3 @@ def scan
|
1266 | 1265 | end
|
1267 | 1266 |
|
1268 | 1267 | end
|
1269 |
| - |
0 commit comments