summaryrefslogtreecommitdiff
path: root/lib/rdoc/ri
diff options
context:
space:
mode:
authorxstnztk <42609037+xstnztk@users.noreply.github.com>2021-04-16 13:42:23 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-05 11:34:22 +0900
commitc7d1989986becc0e403afc35ad4caa5806e787be (patch)
tree1b2b678fd9b9f0d8b245c02ad690ac625548aec3 /lib/rdoc/ri
parentcca2f7ab14ace71eb93992472d8fa0f29de9cad4 (diff)
[ruby/rdoc] Document 'ruby:' to show core documentation in ri
ri supports 'ruby:' as a kind of "pseudo gem name" to display files of the core Ruby documentation such as syntax and NEWS. Add the appropriate documentation to the description of options shown by "ri --help". https://github.com/ruby/rdoc/commit/a0e5df6702
Diffstat (limited to 'lib/rdoc/ri')
-rw-r--r--lib/rdoc/ri/driver.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index a4b70b8f56..0408cbb0aa 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -142,6 +142,8 @@ Where name can be:
gem_name: | gem_name:README | gem_name:History
+ ruby: | ruby:NEWS | ruby:globals
+
All class names may be abbreviated to their minimum unambiguous form.
If a name is ambiguous, all valid options will be listed.
@@ -153,6 +155,10 @@ they're contained in. If the gem name is followed by a ':' all files in the
gem will be shown. The file name extension may be omitted where it is
unambiguous.
+'ruby' can be used as a pseudo gem name to display files from the Ruby
+core documentation. Use 'ruby:' by itself to get a list of all available
+core documentation files.
+
For example:
#{opt.program_name} Fil
@@ -160,6 +166,7 @@ For example:
#{opt.program_name} File.new
#{opt.program_name} zip
#{opt.program_name} rdoc:README
+ #{opt.program_name} ruby:comments
Note that shell quoting or escaping may be required for method names
containing punctuation: