[前][次][番号順一覧][スレッド一覧]

ruby-changes:66687

From: xstnztk <ko1@a...>
Date: Mon, 5 Jul 2021 18:35:33 +0900 (JST)
Subject: [ruby-changes:66687] c7d1989986 (master): [ruby/rdoc] Document 'ruby:' to show core documentation in ri

https://git.ruby-lang.org/ruby.git/commit/?id=c7d1989986

From c7d1989986becc0e403afc35ad4caa5806e787be Mon Sep 17 00:00:00 2001
From: xstnztk <42609037+xstnztk@u...>
Date: Fri, 16 Apr 2021 13:42:23 +0200
Subject: [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
---
 lib/rdoc/ri/driver.rb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index a4b70b8..0408cbb 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -142,6 +142,8 @@ Where name can be: https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ri/driver.rb#L142
 
   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 https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ri/driver.rb#L155
 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: https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ri/driver.rb#L166
     #{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:
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]