[ruby/irb] Declare rdoc as dependency

(https://github.com/ruby/irb/pull/648)

IRB already has several features that rely on rdoc, such as:

- Autocompletion's document dialog
- Autocompletion's `PerfectMatchedProc`
- The `show_doc` command
- Easter egg

And we could use its pager more in the future too. So it makes sense to
declare rdoc as a dependency instead of relying on the one bundled with
Ruby.

https://github.com/ruby/irb/commit/4dffbb1dd3
This commit is contained in:
Stan Lo 2023-07-18 14:53:24 +01:00 коммит произвёл git
Родитель b89b7d8fdc
Коммит 0db58dd0db
2 изменённых файлов: 4 добавлений и 3 удалений

6
dir.c
Просмотреть файл

@ -3266,7 +3266,7 @@ dir_open_dir(int argc, VALUE *argv)
* #<Encoding:UTF-8>
* #<Encoding:US-ASCII>
*
* See {String Encoding}[https://docs.ruby-lang.org/en/master/encodings_rdoc.html#label-String+Encoding].
* See {String Encoding}[rdoc-ref:encodings.rdoc@String+Encoding].
*
* Returns an enumerator if no block is given.
*/
@ -3302,7 +3302,7 @@ dir_collect(VALUE dir)
* Dir.entries('/example', encoding: 'US-ASCII').first.encoding
* # => #<Encoding:US-ASCII>
*
* See {String Encoding}[https://docs.ruby-lang.org/en/master/encodings_rdoc.html#label-String+Encoding].
* See {String Encoding}[rdoc-ref:encodings.rdoc@String+Encoding].
*
* Raises an exception if the directory does not exist.
*/
@ -3399,7 +3399,7 @@ dir_collect_children(VALUE dir)
* Dir.children('/example', encoding: 'US-ASCII').first.encoding
* # => #<Encoding:US-ASCII>
*
* See {String Encoding}[https://docs.ruby-lang.org/en/master/encodings_rdoc.html#label-String+Encoding].
* See {String Encoding}[rdoc-ref:encodings.rdoc@String+Encoding].
*
* Raises an exception if the directory does not exist.
*/

Просмотреть файл

@ -42,4 +42,5 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7")
spec.add_dependency "reline", ">= 0.3.6"
spec.add_dependency "rdoc", "~> 6.5"
end