rdoc 6.17.0 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +193 -0
  3. data/LEGAL.rdoc +6 -0
  4. data/LICENSE.rdoc +4 -0
  5. data/README.md +132 -8
  6. data/RI.md +75 -75
  7. data/doc/markup_reference/markdown.md +659 -0
  8. data/doc/markup_reference/rdoc.rdoc +1169 -0
  9. data/exe/rdoc +2 -2
  10. data/lib/rdoc/code_object/alias.rb +70 -74
  11. data/lib/rdoc/code_object/any_method.rb +308 -293
  12. data/lib/rdoc/code_object/attr.rb +150 -142
  13. data/lib/rdoc/code_object/class_module.rb +802 -715
  14. data/lib/rdoc/code_object/constant.rb +181 -144
  15. data/lib/rdoc/code_object/context/section.rb +140 -130
  16. data/lib/rdoc/code_object/context.rb +925 -941
  17. data/lib/rdoc/code_object/extend.rb +7 -5
  18. data/lib/rdoc/code_object/include.rb +7 -5
  19. data/lib/rdoc/code_object/method_attr.rb +328 -315
  20. data/lib/rdoc/code_object/mixin.rb +97 -92
  21. data/lib/rdoc/code_object/normal_class.rb +77 -78
  22. data/lib/rdoc/code_object/normal_module.rb +61 -59
  23. data/lib/rdoc/code_object/require.rb +23 -39
  24. data/lib/rdoc/code_object/single_class.rb +21 -19
  25. data/lib/rdoc/code_object/top_level.rb +215 -202
  26. data/lib/rdoc/code_object.rb +305 -305
  27. data/lib/rdoc/comment.rb +274 -337
  28. data/lib/rdoc/cross_reference.rb +195 -206
  29. data/lib/rdoc/encoding.rb +105 -103
  30. data/lib/rdoc/erb_partial.rb +13 -11
  31. data/lib/rdoc/erbio.rb +29 -27
  32. data/lib/rdoc/generator/aliki.rb +196 -30
  33. data/lib/rdoc/generator/darkfish.rb +647 -629
  34. data/lib/rdoc/generator/json_index.rb +233 -229
  35. data/lib/rdoc/generator/markup.rb +165 -122
  36. data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
  37. data/lib/rdoc/generator/pot/po.rb +52 -51
  38. data/lib/rdoc/generator/pot/po_entry.rb +138 -132
  39. data/lib/rdoc/generator/pot.rb +85 -81
  40. data/lib/rdoc/generator/ri.rb +23 -19
  41. data/lib/rdoc/generator/template/aliki/DESIGN.md +538 -0
  42. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +1 -1
  43. data/lib/rdoc/generator/template/aliki/_footer.rhtml +2 -2
  44. data/lib/rdoc/generator/template/aliki/_head.rhtml +15 -10
  45. data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
  46. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +8 -6
  47. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +8 -6
  48. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
  49. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +3 -3
  50. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +3 -3
  51. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
  52. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +1 -1
  53. data/lib/rdoc/generator/template/aliki/class.rhtml +71 -61
  54. data/lib/rdoc/generator/template/aliki/css/rdoc.css +796 -323
  55. data/lib/rdoc/generator/template/aliki/index.rhtml +1 -1
  56. data/lib/rdoc/generator/template/aliki/js/aliki.js +119 -113
  57. data/lib/rdoc/generator/template/aliki/js/bash_highlighter.js +167 -0
  58. data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +1 -1
  59. data/lib/rdoc/generator/template/aliki/js/{search.js → search_controller.js} +16 -7
  60. data/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
  61. data/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
  62. data/lib/rdoc/generator/template/aliki/page.rhtml +1 -1
  63. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
  64. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +2 -2
  65. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +1 -1
  66. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -6
  67. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -6
  68. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
  69. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +2 -2
  70. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
  71. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
  72. data/lib/rdoc/generator/template/darkfish/class.rhtml +29 -32
  73. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +19 -1
  74. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
  75. data/lib/rdoc/generator.rb +48 -46
  76. data/lib/rdoc/i18n/locale.rb +99 -95
  77. data/lib/rdoc/i18n/text.rb +109 -105
  78. data/lib/rdoc/i18n.rb +7 -5
  79. data/lib/rdoc/markdown/byte_runtime.rb +80 -0
  80. data/lib/rdoc/markdown.kpeg +52 -33
  81. data/lib/rdoc/markdown.rb +365 -177
  82. data/lib/rdoc/markup/blank_line.rb +25 -23
  83. data/lib/rdoc/markup/block_quote.rb +12 -8
  84. data/lib/rdoc/markup/document.rb +127 -123
  85. data/lib/rdoc/markup/element.rb +21 -0
  86. data/lib/rdoc/markup/formatter.rb +220 -203
  87. data/lib/rdoc/markup/hard_break.rb +30 -27
  88. data/lib/rdoc/markup/heading.rb +163 -77
  89. data/lib/rdoc/markup/include.rb +33 -29
  90. data/lib/rdoc/markup/indented_paragraph.rb +37 -33
  91. data/lib/rdoc/markup/inline_parser.rb +316 -0
  92. data/lib/rdoc/markup/list.rb +80 -88
  93. data/lib/rdoc/markup/list_item.rb +73 -85
  94. data/lib/rdoc/markup/paragraph.rb +23 -19
  95. data/lib/rdoc/markup/parser.rb +501 -497
  96. data/lib/rdoc/markup/pre_process.rb +284 -305
  97. data/lib/rdoc/markup/raw.rb +52 -55
  98. data/lib/rdoc/markup/rule.rb +16 -12
  99. data/lib/rdoc/markup/table.rb +48 -40
  100. data/lib/rdoc/markup/to_ansi.rb +143 -92
  101. data/lib/rdoc/markup/to_bs.rb +86 -102
  102. data/lib/rdoc/markup/to_html.rb +608 -506
  103. data/lib/rdoc/markup/to_html_crossref.rb +219 -210
  104. data/lib/rdoc/markup/to_html_snippet.rb +210 -205
  105. data/lib/rdoc/markup/to_joined_paragraph.rb +40 -41
  106. data/lib/rdoc/markup/to_label.rb +64 -51
  107. data/lib/rdoc/markup/to_markdown.rb +212 -184
  108. data/lib/rdoc/markup/to_rdoc.rb +341 -277
  109. data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
  110. data/lib/rdoc/markup/to_test.rb +62 -50
  111. data/lib/rdoc/markup/to_tt_only.rb +83 -92
  112. data/lib/rdoc/markup/verbatim.rb +62 -58
  113. data/lib/rdoc/markup.rb +196 -215
  114. data/lib/rdoc/options.rb +1063 -1076
  115. data/lib/rdoc/parser/c.rb +1039 -1036
  116. data/lib/rdoc/parser/changelog.rb +320 -287
  117. data/lib/rdoc/parser/markdown.rb +17 -13
  118. data/lib/rdoc/parser/rbs.rb +279 -0
  119. data/lib/rdoc/parser/rd.rb +17 -13
  120. data/lib/rdoc/parser/ruby.rb +1231 -2222
  121. data/lib/rdoc/parser/ruby_colorizer.rb +303 -0
  122. data/lib/rdoc/parser/simple.rb +31 -27
  123. data/lib/rdoc/parser/text.rb +12 -8
  124. data/lib/rdoc/parser.rb +230 -221
  125. data/lib/rdoc/rbs_helper.rb +186 -0
  126. data/lib/rdoc/rd/inline.rb +57 -53
  127. data/lib/rdoc/rd.rb +90 -88
  128. data/lib/rdoc/rdoc.rb +547 -366
  129. data/lib/rdoc/ri/driver.rb +1141 -1130
  130. data/lib/rdoc/ri/formatter.rb +7 -3
  131. data/lib/rdoc/ri/paths.rb +140 -136
  132. data/lib/rdoc/ri/servlet.rb +456 -0
  133. data/lib/rdoc/ri/store.rb +4 -2
  134. data/lib/rdoc/ri/task.rb +55 -51
  135. data/lib/rdoc/ri.rb +14 -11
  136. data/lib/rdoc/rubygems_hook.rb +194 -192
  137. data/lib/rdoc/server.rb +462 -0
  138. data/lib/rdoc/stats/normal.rb +46 -42
  139. data/lib/rdoc/stats/quiet.rb +39 -35
  140. data/lib/rdoc/stats/verbose.rb +35 -31
  141. data/lib/rdoc/stats.rb +363 -338
  142. data/lib/rdoc/store.rb +919 -725
  143. data/lib/rdoc/task.rb +260 -255
  144. data/lib/rdoc/text.rb +164 -240
  145. data/lib/rdoc/token_stream.rb +88 -106
  146. data/lib/rdoc/tom_doc.rb +203 -201
  147. data/lib/rdoc/version.rb +1 -1
  148. data/lib/rdoc.rb +35 -7
  149. data/lib/rubygems_plugin.rb +2 -11
  150. data/rdoc-logo.svg +43 -0
  151. data/rdoc.gemspec +9 -7
  152. metadata +46 -32
  153. data/CONTRIBUTING.rdoc +0 -219
  154. data/ExampleMarkdown.md +0 -39
  155. data/ExampleRDoc.rdoc +0 -210
  156. data/lib/rdoc/code_object/anon_class.rb +0 -10
  157. data/lib/rdoc/code_object/ghost_method.rb +0 -6
  158. data/lib/rdoc/code_object/meta_method.rb +0 -6
  159. data/lib/rdoc/markdown/literals.kpeg +0 -21
  160. data/lib/rdoc/markdown/literals.rb +0 -454
  161. data/lib/rdoc/markup/attr_changer.rb +0 -22
  162. data/lib/rdoc/markup/attr_span.rb +0 -35
  163. data/lib/rdoc/markup/attribute_manager.rb +0 -405
  164. data/lib/rdoc/markup/attributes.rb +0 -70
  165. data/lib/rdoc/markup/regexp_handling.rb +0 -40
  166. data/lib/rdoc/parser/prism_ruby.rb +0 -1100
  167. data/lib/rdoc/parser/ripper_state_lex.rb +0 -302
  168. data/lib/rdoc/parser/ruby_tools.rb +0 -163
  169. data/lib/rdoc/servlet.rb +0 -452
data/RI.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # `ri`: Ruby Information
2
2
 
3
- `ri` (<b>r</b>uby <b>i</b>nformation) is the Ruby command-line utility
4
- that gives fast and easy on-line access to Ruby documentation.
3
+ `ri` (<b>r</b>uby <b>i</b>nformation) is a Ruby command-line utility
4
+ that gives fast and easy online access to Ruby documentation.
5
5
 
6
6
  `ri` can show documentation for Ruby itself and for its installed gems:
7
7
 
@@ -45,10 +45,10 @@ the [Ruby online documentation](https://docs.ruby-lang.org/en/master):
45
45
 
46
46
  - The `ri` documentation is always available, even when you do not have internet access
47
47
  (think: airplane mode).
48
- - If you are working in a terminal window, typing `ri _whatever_` (or just `ri`)
48
+ - If you are working in a terminal window, typing `ri <whatever>` (or just `ri`)
49
49
  may be faster than navigating to a browser window and searching for documentation.
50
50
  - If you are working in an
51
- [irb \(interactive Ruby\)](https://ruby.github.io/irb/index.html)
51
+ [IRB \(Interactive Ruby\)][9]
52
52
  session, you _already_ have immediate access to `ri`:
53
53
  just type `'show_doc'`.
54
54
 
@@ -82,7 +82,7 @@ In both modes, static and interactive,
82
82
  `ri` responds to an input _name_ that specifies what is to be displayed:
83
83
  a document, multiple documents, or other information:
84
84
 
85
- - Static mode (in the shell): type `'ri _name_'`;
85
+ - Static mode (in the shell): run `ri <name>`;
86
86
  examples (output omitted):
87
87
 
88
88
  ```sh
@@ -109,17 +109,17 @@ a document, multiple documents, or other information:
109
109
  These example `ri` commands cite names for class and module documents
110
110
  (see [details and examples][3]):
111
111
 
112
- | Command | Shows |
113
- |------------------------------|------------------------------------------------------------|
114
- | ri File | Document for Ruby class File. |
115
- | ri File::Stat | Document for Ruby nested class File::Stat. |
116
- | ri Enumerable | Document for Ruby module Enumerable. |
117
- | ri Arr | Document for Ruby class Array (unique initial characters). |
118
- | ri Nokogiri::HTML4::Document | Document for gem class Nokogiri::HTML4::Document. |
119
- | ri Nokogiri | Document for gem module Nokogiri. |
112
+ | Command | Shows |
113
+ |--------------------------------|--------------------------------------------------------------|
114
+ | `ri File` | Document for Ruby class `File`. |
115
+ | `ri File::Stat` | Document for Ruby nested class `File::Stat`. |
116
+ | `ri Enumerable` | Document for Ruby module `Enumerable`. |
117
+ | `ri Arr` | Document for Ruby class `Array` (unique initial characters). |
118
+ | `ri Nokogiri::HTML4::Document` | Document for gem class `Nokogiri::HTML4::Document`. |
119
+ | `ri Nokogiri` | Document for gem module `Nokogiri`. |
120
120
  <br>
121
121
 
122
- If [option \\--all][4]
122
+ If [option `--all`][4]
123
123
  is in effect, documents for the methods in the named class or module
124
124
  are included in the display.
125
125
 
@@ -128,16 +128,16 @@ are included in the display.
128
128
  These example `ri` commands cite names for method documents
129
129
  (see [details and examples][5]):
130
130
 
131
- | Command | Shows |
132
- |--------------------------------------|----------------------------------------------------------------------------------|
133
- | ri IO::readlines | Document for Ruby class method IO::readlines. |
134
- | ri IO#readlines | Document for Ruby instance method IO::readlines. |
135
- | ri IO.readlines | Documents for Ruby instance method IO::readlines and class method IO::readlines. |
136
- | ri ::readlines | Documents for all class methods ::readlines. |
137
- | ri #readlines | Documents for all instance methods #readlines. |
138
- | ri .readlines, ri readlines | Documents for class methods ::readlines and instance methods #readlines. |
139
- | ri Nokogiri::HTML4::Document::parse | Document for gem class method Nokogiri::HTML4::Document::parse. |
140
- | ri Nokogiri::HTML4::Document#fragment | Document for gem instance method Nokogiri::HTML4::Document#fragment. |
131
+ | Command | Shows |
132
+ |-----------------------------------------|--------------------------------------------------------------------------------------|
133
+ | `ri IO::readlines` | Document for Ruby class method `IO::readlines`. |
134
+ | `ri IO#readlines` | Document for Ruby instance method `IO#readlines`. |
135
+ | `ri IO.readlines` | Documents for Ruby class method `IO::readlines` and instance method `IO#readlines`. |
136
+ | `ri ::readlines` | Documents for all class methods `::readlines`. |
137
+ | `ri #readlines` | Documents for all instance methods `#readlines`. |
138
+ | `ri .readlines`, `ri readlines` | Documents for all class methods `::readlines` and all instance methods `#readlines`. |
139
+ | `ri Nokogiri::HTML4::Document::parse` | Document for gem class method `Nokogiri::HTML4::Document::parse`. |
140
+ | `ri Nokogiri::HTML4::Document#fragment` | Document for gem instance method `Nokogiri::HTML4::Document#fragment`. |
141
141
  <br>
142
142
 
143
143
  ### Names for Page Documents
@@ -145,12 +145,12 @@ These example `ri` commands cite names for method documents
145
145
  These example `ri` commands cite names for page documents
146
146
  (see [details and examples][6]):
147
147
 
148
- | Command | Shows |
149
- |--------------------------------|--------------------------------------------------|
150
- | ri ruby:syntax/assignment.rdoc | Document for Ruby page assignment. |
151
- | ri ruby:syntax/assignment | Same document, if no other syntax/assignment.*. |
152
- | ri ruby:assignment | Same document, if no other */assignment.*. |
153
- | ri nokogiri:README.md | Document for page README.md. |
148
+ | Command | Shows |
149
+ |----------------------------------|----------------------------------------------------|
150
+ | `ri ruby:syntax/assignment.rdoc` | Document for Ruby page "assignment". |
151
+ | `ri ruby:syntax/assignment` | Same document, if no other "syntax/assignment.\*". |
152
+ | `ri ruby:assignment` | Same document, if no other "\*/assignment.\*". |
153
+ | `ri nokogiri:README.md` | Document for page "README.md". |
154
154
  <br>
155
155
 
156
156
  ### Names for Lists
@@ -158,14 +158,14 @@ These example `ri` commands cite names for page documents
158
158
  These example `ri` commands cite names for lists
159
159
  (see [details and examples][7]):
160
160
 
161
- | Command | Shows |
162
- |---------------|-------------------------|
163
- | ri ruby: | List of Ruby pages. |
164
- | ri nokogiri: | List of Nokogiri pages. |
161
+ | Command | Shows |
162
+ |----------------|-------------------------|
163
+ | `ri ruby:` | List of Ruby pages. |
164
+ | `ri nokogiri:` | List of Nokogiri pages. |
165
165
  <br>
166
166
 
167
167
  There are more lists available;
168
- see [option \\--list][8].
168
+ see [option `--list`][8].
169
169
 
170
170
  ## Pro Tips
171
171
 
@@ -175,8 +175,8 @@ If you are a frequent `ri` user,
175
175
  you can save time by keeping open a dedicated command window
176
176
  with either of:
177
177
 
178
- - A running [interactive ri][2] session.
179
- - A running [irb session][9];
178
+ - A running [interactive `ri`][2] session.
179
+ - A running [`irb` session][9];
180
180
  type `'show_doc'` to enter `ri`, newline to exit.
181
181
 
182
182
  When you switch to that window, `ri` is ready to respond quickly,
@@ -199,7 +199,7 @@ $ RI_PAGER="grep . | less" ri Array
199
199
  ```
200
200
 
201
201
  See the documentation for your chosen pager programs
202
- (e.g, type `'grep --help'`, `'less --help'`).
202
+ (e.g, run `grep --help`, `less --help`).
203
203
 
204
204
  ### Links in `ri` Output
205
205
 
@@ -254,10 +254,10 @@ When you see:
254
254
  - `ri` output can be large;
255
255
  to save space, an example may pipe it to one of these:
256
256
 
257
- - [head](https://www.man7.org/linux/man-pages/man1/head.1.html): leading lines only.
258
- - [tail](https://www.man7.org/linux/man-pages/man1/tail.1.html): trailing lines only.
259
- - [wc -l](https://www.man7.org/linux/man-pages/man1/wc.1.html): line count only.
260
- - [grep](https://www.man7.org/linux/man-pages/man1/grep.1.html): selected lines only.
257
+ - [`head`](https://www.man7.org/linux/man-pages/man1/head.1.html): leading lines only.
258
+ - [`tail`](https://www.man7.org/linux/man-pages/man1/tail.1.html): trailing lines only.
259
+ - [`wc -l`](https://www.man7.org/linux/man-pages/man1/wc.1.html): line count only.
260
+ - [`grep`](https://www.man7.org/linux/man-pages/man1/grep.1.html): selected lines only.
261
261
 
262
262
  - An example that involves a gem assumes that gems `nokogiri` and `minitest` are installed.
263
263
 
@@ -268,15 +268,15 @@ in the `ri` document for a class, module, method, or page.
268
268
 
269
269
  See also:
270
270
 
271
- - [Pager][10].
272
- - [Links in ri Output][11].
271
+ - [Pager][10]
272
+ - [Links in `ri` Output][11]
273
273
 
274
274
  ### Class and Module Documents
275
275
 
276
276
  The document for a class or module shows:
277
277
 
278
- - The class or module name, along with its parent class if any.
279
- - Where it's defined (Ruby core or gem).
278
+ - The class or module name, along with its parent class, if any.
279
+ - Where it's defined (Ruby core or a gem).
280
280
  - When each exists:
281
281
 
282
282
  - The names of its included modules.
@@ -335,7 +335,7 @@ $ ri IO | grep "^= "
335
335
 
336
336
  The document for a method includes:
337
337
 
338
- - The source of the method: `'(from ruby core)'` or `'(from gem _gem_)'`.
338
+ - The source of the method: `'(from ruby core)'` or `'(from gem <gem>)'`.
339
339
  - The calling sequence(s) for the method.
340
340
  - The text of its embedded documentation (if it exists).
341
341
 
@@ -374,7 +374,7 @@ the number of such implementations depends on the _name_:
374
374
  - Within a class:
375
375
 
376
376
  Each of these commands shows documents
377
- for methods in Ruby class `IO` (output omitted):
377
+ for methods in the Ruby class `IO` (output omitted):
378
378
 
379
379
  ```sh
380
380
  $ ri IO::readlines # Class method ::readlines.
@@ -467,7 +467,7 @@ rdoc:
467
467
 
468
468
  ## `ri` Lists
469
469
 
470
- The list of Ruby pages is available via _name_ `'ruby:'`:
470
+ The list of Ruby pages is available via the _name_ `'ruby:'`:
471
471
 
472
472
  ```sh
473
473
  $ ri ruby: | head
@@ -497,7 +497,7 @@ syntax/refinements.rdoc
497
497
  win32/README.win32
498
498
  ```
499
499
 
500
- The list of gem pages is available via _name_ `'_gem_name_'`:
500
+ The list of gem pages is available via the _name_ `'<gem_name>:'`:
501
501
 
502
502
  ```sh
503
503
  $ ri nokogiri: | head
@@ -509,9 +509,9 @@ lib/nokogiri/css/tokenizer.rex
509
509
 
510
510
  See also:
511
511
 
512
- - [Option \\--list][8]:
512
+ - [Option `--list`][8]:
513
513
  lists classes and modules.
514
- - [Option \\--list-doc-dirs][12]:
514
+ - [Option `--list-doc-dirs`][12]:
515
515
  lists `ri` source directories.
516
516
 
517
517
  ## `ri` Information
@@ -519,12 +519,12 @@ See also:
519
519
  With certain options,
520
520
  an `ri` command may display information other than documents or lists:
521
521
 
522
- - [Option \\--help or -h][13]:
522
+ - [Option `--help` or `-h`][13]:
523
523
  Shows `ri` help text.
524
- - [option \\--version or -v][14]:
524
+ - [Option `--version` or `-v`][14]:
525
525
  Shows `ri` version.
526
- - [Option \\--dump=FILEPATH][15]:
527
- Shows dump of `ri` cache file at the given filepath.
526
+ - [Option `--dump=FILEPATH`][15]:
527
+ Shows a dump of `ri` cache file at the given filepath.
528
528
 
529
529
  ## Static Mode
530
530
 
@@ -549,7 +549,7 @@ elements. Any object may be an Array element.
549
549
 
550
550
  `ri` also responds in static mode when certain options are given,
551
551
  even when no _name_ is given;
552
- see [ri Information][16].
552
+ see [`ri` Information][16].
553
553
 
554
554
  ## Interactive Mode
555
555
 
@@ -565,18 +565,18 @@ Enter a blank line to exit.
565
565
 
566
566
  ```
567
567
 
568
- A command in interactive mode are similar to one in static mode,
568
+ A command in interactive mode is similar to one in static mode,
569
569
  except that it:
570
570
 
571
- - Omits command word `ri`; you just type the _name_.
571
+ - Omits the command word `ri`; you just type the _name_.
572
572
  - Omits options; in interactive mode the only options in effect
573
573
  are those taken from environment variable `RI`.
574
574
  See [Options][17].
575
575
  - Supports tab auto-completion for the name of a class, module, or method;
576
- when, for example, you type `"Arr\t"` (here `"\t` represents the tab character),
576
+ when, for example, you type `"Arr\t"` (here `\t` represents the tab character),
577
577
  `ri` "completes" the text as `'Array '`.
578
578
 
579
- See also [ri at the Ready][18].
579
+ See also [`ri` at the Ready][18].
580
580
 
581
581
  ## Pager
582
582
 
@@ -592,7 +592,7 @@ which is the program whose name is the first-found among:
592
592
 
593
593
  If none is found, the output goes directly to `$stdout`, with no pager.
594
594
 
595
- If you set environment variable `RI_PAGER` or `PAGER`,
595
+ If you set the environment variable `RI_PAGER` or `PAGER`,
596
596
  its value should be the name of an executable program
597
597
  that will accept the `ri` output (such as `'pager'`, `'less'`, or `'more'`).
598
598
 
@@ -601,9 +601,9 @@ See also [Output Filters][19].
601
601
  ## Options
602
602
 
603
603
  Options may be given on the `ri` command line;
604
- those should be whitespace-separated, and must precede the given _name_, if any.
604
+ those should be whitespace-separated and must precede the given _name_, if any.
605
605
 
606
- Options may also be specified in environment variable `RI`;
606
+ Options may also be specified in the environment variable `RI`;
607
607
  those should also be whitespace-separated.
608
608
 
609
609
  An option specified in environment variable `RI`
@@ -643,21 +643,21 @@ $ ri --list --no-gems| wc -l
643
643
 
644
644
  #### Options `--home`, `--no-home`
645
645
 
646
- Option `--home` (the default) specifies that `ri` is to include source directory
646
+ Option `--home` (the default) specifies that `ri` is to include the source directory
647
647
  in `~/.rdoc` if it exists;
648
- option `--no-home` may be used to exclude them.
648
+ option `--no-home` may be used to exclude it.
649
649
 
650
650
  #### Options `--list-doc-dirs`, `--no-list-doc-dirs`
651
651
 
652
652
  Option `--list-doc-dirs` specifies that a list of the `ri` source directories
653
653
  is to be displayed;
654
- default is `--no-list-doc-dirs`.
654
+ the default is `--no-list-doc-dirs`.
655
655
 
656
656
  #### Option `--no-standard`
657
657
 
658
658
  Option `--no-standard` specifies that documents from the standard libraries
659
659
  are not to be included;
660
- default is to include documents from the standard libraries.
660
+ the default is to include documents from the standard libraries.
661
661
 
662
662
  #### Options `--site`, `--no-site`
663
663
 
@@ -680,7 +680,7 @@ specifies that `ri` is to enter interactive mode (ignoring the _name_ if given);
680
680
  the option is the default when no _name_ is given;
681
681
  option `--no-interactive` (the default)
682
682
  specifies that `ri` is not to enter interactive mode,
683
- regardless of whether _name_ is given.
683
+ regardless of whether a _name_ is given.
684
684
 
685
685
  ### Information Options
686
686
 
@@ -785,7 +785,7 @@ is not to be displayed.
785
785
 
786
786
  #### Options `--all`, `-a`, `--no-all`
787
787
 
788
- Option `--all` (aliased as `-a`) specifies that when _name_ identifies a class or module,
788
+ Option `--all` (aliased as `-a`) specifies that when a _name_ identifies a class or module,
789
789
  the documents for all its methods are included;
790
790
  option `--no-all` (the default) specifies that the method documents are not to be included:
791
791
 
@@ -809,16 +809,16 @@ the default port is `8214`.
809
809
  `ri` by default reads data from directories installed by Ruby and gems.
810
810
 
811
811
  You can create your own `ri` source files.
812
- This command creates `ri` source files in local directory `my_ri`,
813
- from Ruby source files in local directory `my_sources`:
812
+ This command creates `ri` source files in the local directory `my_ri`,
813
+ from Ruby source files in the local directory `my_sources`:
814
814
 
815
815
  ```sh
816
816
  $ rdoc --op my_ri --format=ri my_sources
817
817
  ```
818
818
 
819
819
  Those files may then be considered for any `ri` command
820
- by specifying option `--doc-dir=my_ri`;
821
- see [option \\--doc-dir][20].
820
+ by specifying the option `--doc-dir=my_ri`;
821
+ see [option `--doc-dir`][20].
822
822
 
823
823
  [1]: rdoc-ref:RI.md@Static+Mode
824
824
  [2]: rdoc-ref:RI.md@Interactive+Mode
@@ -828,7 +828,7 @@ see [option \\--doc-dir][20].
828
828
  [6]: rdoc-ref:RI.md@Page+Documents
829
829
  [7]: rdoc-ref:RI.md@ri+Lists
830
830
  [8]: rdoc-ref:RI.md@Options+--list-2C+-l-2C+--no-list
831
- [9]: https://docs.ruby-lang.org/en/master/IRB.html
831
+ [9]: https://ruby.github.io/irb/
832
832
  [10]: rdoc-ref:RI.md@Pager
833
833
  [11]: rdoc-ref:RI.md@Links+in+ri+Output
834
834
  [12]: rdoc-ref:RI.md@Options+--list-doc-dirs-2C+--no-list-doc-dirs