Skip to content

Commit a0e5df6

Browse files
authored
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".
1 parent 9a3c1f1 commit a0e5df6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/rdoc/ri/driver.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ def self.process_args argv
142142
143143
gem_name: | gem_name:README | gem_name:History
144144
145+
ruby: | ruby:NEWS | ruby:globals
146+
145147
All class names may be abbreviated to their minimum unambiguous form.
146148
If a name is ambiguous, all valid options will be listed.
147149
@@ -153,13 +155,18 @@ def self.process_args argv
153155
gem will be shown. The file name extension may be omitted where it is
154156
unambiguous.
155157
158+
'ruby' can be used as a pseudo gem name to display files from the Ruby
159+
core documentation. Use 'ruby:' by itself to get a list of all available
160+
core documentation files.
161+
156162
For example:
157163
158164
#{opt.program_name} Fil
159165
#{opt.program_name} File
160166
#{opt.program_name} File.new
161167
#{opt.program_name} zip
162168
#{opt.program_name} rdoc:README
169+
#{opt.program_name} ruby:comments
163170
164171
Note that shell quoting or escaping may be required for method names
165172
containing punctuation:

0 commit comments

Comments
 (0)