[DOC] Fixes for link fragments (#7981)
This commit is contained in:
parent
bc3ac1872e
commit
6528cf9fcf
Notes:
git
2023-06-28 13:06:03 +00:00
Merged-By: peterzhu2118 <peter@peterzhu.ca>
@ -26,7 +26,7 @@ Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい
|
|||||||
* ダイナミックローディング (アーキテクチャによる)
|
* ダイナミックローディング (アーキテクチャによる)
|
||||||
* 移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で動くだけでなく,Windows, macOS,
|
* 移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で動くだけでなく,Windows, macOS,
|
||||||
Haikuなどの上でも動く cf.
|
Haikuなどの上でも動く cf.
|
||||||
https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc#platform-maintainers
|
https://docs.ruby-lang.org/en/master/maintainers_md.html#label-Platform+Maintainers
|
||||||
|
|
||||||
|
|
||||||
## 入手法
|
## 入手法
|
||||||
|
@ -25,7 +25,7 @@ It is simple, straightforward, and extensible.
|
|||||||
* Dynamic Loading of Object Files (on some architectures)
|
* Dynamic Loading of Object Files (on some architectures)
|
||||||
* Highly Portable (works on many Unix-like/POSIX compatible platforms as
|
* Highly Portable (works on many Unix-like/POSIX compatible platforms as
|
||||||
well as Windows, macOS, etc.) cf.
|
well as Windows, macOS, etc.) cf.
|
||||||
https://github.com/ruby/ruby/blob/master/doc/maintainers.md#platform-maintainers
|
https://docs.ruby-lang.org/en/master/maintainers_md.html#label-Platform+Maintainers
|
||||||
|
|
||||||
## How to get Ruby
|
## How to get Ruby
|
||||||
|
|
||||||
|
@ -41,16 +41,17 @@ Use your judgment about what the user needs to know.
|
|||||||
- Write short declarative or imperative sentences.
|
- Write short declarative or imperative sentences.
|
||||||
- Group sentences into (ideally short) paragraphs,
|
- Group sentences into (ideally short) paragraphs,
|
||||||
each covering a single topic.
|
each covering a single topic.
|
||||||
- Organize material with [headers](rdoc-ref:RDoc::Markup@Headers).
|
- Organize material with
|
||||||
|
[headings](rdoc-ref:RDoc::MarkupReference@Headings).
|
||||||
- Refer to authoritative and relevant sources using
|
- Refer to authoritative and relevant sources using
|
||||||
[links](rdoc-ref:RDoc::Markup@Links).
|
[links](rdoc-ref:RDoc::MarkupReference@Links).
|
||||||
- Use simple verb tenses: simple present, simple past, simple future.
|
- Use simple verb tenses: simple present, simple past, simple future.
|
||||||
- Use simple sentence structure, not compound or complex structure.
|
- Use simple sentence structure, not compound or complex structure.
|
||||||
- Avoid:
|
- Avoid:
|
||||||
- Excessive comma-separated phrases;
|
- Excessive comma-separated phrases;
|
||||||
consider a [list](rdoc-ref:RDoc::Markup@Simple+Lists).
|
consider a [list](rdoc-ref:RDoc::MarkupReference@Lists).
|
||||||
- Idioms and culture-specific references.
|
- Idioms and culture-specific references.
|
||||||
- Overuse of headers.
|
- Overuse of headings.
|
||||||
- Using US-ASCII-incompatible characters in C source files;
|
- Using US-ASCII-incompatible characters in C source files;
|
||||||
see [Characters](#label-Characters) below.
|
see [Characters](#label-Characters) below.
|
||||||
|
|
||||||
@ -124,16 +125,16 @@ a.shuffle! #=> [2, 3, 1]
|
|||||||
a #=> [2, 3, 1]
|
a #=> [2, 3, 1]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Headers
|
### Headings
|
||||||
|
|
||||||
Organize a long discussion with [headers](rdoc-ref:RDoc::Markup@Headers).
|
Organize a long discussion with [headings](rdoc-ref:RDoc::MarkupReference@Headings).
|
||||||
|
|
||||||
### Blank Lines
|
### Blank Lines
|
||||||
|
|
||||||
A blank line begins a new paragraph.
|
A blank line begins a new paragraph.
|
||||||
|
|
||||||
A [code block](rdoc-ref:RDoc::Markup@Paragraphs+and+Verbatim)
|
A [code block](rdoc-ref:RDoc::MarkupReference@Code+Blocks)
|
||||||
or [list](rdoc-ref:RDoc::Markup@Simple+Lists)
|
or [list](rdoc-ref:RDoc::MarkupReference@Lists)
|
||||||
should be preceded by and followed by a blank line.
|
should be preceded by and followed by a blank line.
|
||||||
This is unnecessary for the HTML output, but helps in the `ri` output.
|
This is unnecessary for the HTML output, but helps in the `ri` output.
|
||||||
|
|
||||||
@ -214,7 +215,7 @@ Guidelines:
|
|||||||
|
|
||||||
- The section title is `What's Here`.
|
- The section title is `What's Here`.
|
||||||
- Consider listing the parent class and any included modules; consider
|
- Consider listing the parent class and any included modules; consider
|
||||||
[links](rdoc-ref:RDoc::Markup@Links)
|
[links](rdoc-ref:RDoc::MarkupReference@Links)
|
||||||
to their "What's Here" sections if those exist.
|
to their "What's Here" sections if those exist.
|
||||||
- List methods as a bullet list:
|
- List methods as a bullet list:
|
||||||
|
|
||||||
@ -224,9 +225,9 @@ Guidelines:
|
|||||||
(and do not list the aliases separately).
|
(and do not list the aliases separately).
|
||||||
- Check the rendered documentation to determine whether \RDoc has recognized
|
- Check the rendered documentation to determine whether \RDoc has recognized
|
||||||
the method and linked to it; if not, manually insert a
|
the method and linked to it; if not, manually insert a
|
||||||
[link](rdoc-ref:RDoc::Markup@Links).
|
[link](rdoc-ref:RDoc::MarkupReference@Links).
|
||||||
|
|
||||||
- If there are numerous entries, consider grouping them into subsections with headers.
|
- If there are numerous entries, consider grouping them into subsections with headings.
|
||||||
- If there are more than a few such subsections,
|
- If there are more than a few such subsections,
|
||||||
consider adding a table of contents just below the main section title.
|
consider adding a table of contents just below the main section title.
|
||||||
|
|
||||||
@ -249,7 +250,7 @@ For methods written in Ruby, \RDoc documents the calling sequence automatically.
|
|||||||
|
|
||||||
For methods written in C, \RDoc cannot determine what arguments
|
For methods written in C, \RDoc cannot determine what arguments
|
||||||
the method accepts, so those need to be documented using \RDoc directive
|
the method accepts, so those need to be documented using \RDoc directive
|
||||||
[`call-seq:`](rdoc-ref:RDoc::Markup@Method+arguments).
|
[`call-seq:`](rdoc-ref:RDoc::MarkupReference@Directives+for+Method+Documentation).
|
||||||
|
|
||||||
For a singleton method, use the form:
|
For a singleton method, use the form:
|
||||||
|
|
||||||
@ -388,7 +389,7 @@ argument passed if it is not obvious, not explicitly mentioned in the
|
|||||||
details, and not implicitly shown in the examples.
|
details, and not implicitly shown in the examples.
|
||||||
|
|
||||||
If there is more than one argument or block argument, use a
|
If there is more than one argument or block argument, use a
|
||||||
[labeled list](rdoc-ref:RDoc::Markup@Labeled+Lists).
|
[labeled list](rdoc-ref:RDoc::MarkupReference@Labeled+Lists).
|
||||||
|
|
||||||
### Corner Cases and Exceptions
|
### Corner Cases and Exceptions
|
||||||
|
|
||||||
|
@ -137,15 +137,16 @@ returns the \Encoding of the concatenated string, or +nil+ if incompatible:
|
|||||||
A Ruby String object has an encoding that is an instance of class \Encoding.
|
A Ruby String object has an encoding that is an instance of class \Encoding.
|
||||||
The encoding may be retrieved by method String#encoding.
|
The encoding may be retrieved by method String#encoding.
|
||||||
|
|
||||||
The default encoding for a string literal is the script encoding
|
The default encoding for a string literal is the script encoding;
|
||||||
(see Encoding@Script+encoding):
|
see (Script Encoding)[rdoc-ref:encodings.rdoc@Script+Encoding].
|
||||||
|
|
||||||
's'.encoding # => #<Encoding:UTF-8>
|
's'.encoding # => #<Encoding:UTF-8>
|
||||||
|
|
||||||
The default encoding for a string created with method String.new is:
|
The default encoding for a string created with method String.new is:
|
||||||
|
|
||||||
- For a \String object argument, the encoding of that string.
|
- For a \String object argument, the encoding of that string.
|
||||||
- For a string literal, the script encoding (see Encoding@Script+encoding).
|
- For a string literal, the script encoding;
|
||||||
|
see {Script Encoding}[https://docs.ruby-lang.org/en/master/encodings_rdoc.html#label-Script+Encoding].
|
||||||
|
|
||||||
In either case, any encoding may be specified:
|
In either case, any encoding may be specified:
|
||||||
|
|
||||||
@ -190,7 +191,8 @@ the encoding may be retrieved by method Symbol#encoding or Regexp#encoding.
|
|||||||
The default encoding for these, however, is:
|
The default encoding for these, however, is:
|
||||||
|
|
||||||
- US-ASCII, if all characters are US-ASCII.
|
- US-ASCII, if all characters are US-ASCII.
|
||||||
- The script encoding, otherwise (see Encoding@Script+encoding).
|
- The script encoding, otherwise;
|
||||||
|
see (Script Encoding)[rdoc-ref:encodings.rdoc@Script+Encoding].
|
||||||
|
|
||||||
=== Filesystem \Encoding
|
=== Filesystem \Encoding
|
||||||
|
|
||||||
|
3
file.c
3
file.c
@ -7134,7 +7134,6 @@ const char ruby_null_device[] =
|
|||||||
*
|
*
|
||||||
* Note that file permissions are quite different from the _mode_
|
* Note that file permissions are quite different from the _mode_
|
||||||
* of a file stream (\File object).
|
* of a file stream (\File object).
|
||||||
* See IO@Modes.
|
|
||||||
*
|
*
|
||||||
* In a \File object, the permissions are available thus,
|
* In a \File object, the permissions are available thus,
|
||||||
* where method +mode+, despite its name, returns permissions:
|
* where method +mode+, despite its name, returns permissions:
|
||||||
@ -7190,7 +7189,7 @@ const char ruby_null_device[] =
|
|||||||
*
|
*
|
||||||
* - Inherits from {class IO}[rdoc-ref:IO@What-27s+Here],
|
* - Inherits from {class IO}[rdoc-ref:IO@What-27s+Here],
|
||||||
* in particular, methods for creating, reading, and writing files
|
* in particular, methods for creating, reading, and writing files
|
||||||
* - Includes {module FileTest}[rdoc-ref:FileTest@What-27s+Here].
|
* - Includes module FileTest,
|
||||||
* which provides dozens of additional methods.
|
* which provides dozens of additional methods.
|
||||||
*
|
*
|
||||||
* Here, class \File provides methods that are useful for:
|
* Here, class \File provides methods that are useful for:
|
||||||
|
4
io.c
4
io.c
@ -11995,7 +11995,7 @@ io_s_foreach(VALUE v)
|
|||||||
*
|
*
|
||||||
* - {Open Options}[rdoc-ref:IO@Open+Options].
|
* - {Open Options}[rdoc-ref:IO@Open+Options].
|
||||||
* - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
|
* - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
|
||||||
* - {Line Options}[rdoc-ref:IO@Line+Options].
|
* - {Line Options}[rdoc-ref:IO@Line+IO].
|
||||||
*
|
*
|
||||||
* Returns an Enumerator if no block is given.
|
* Returns an Enumerator if no block is given.
|
||||||
*
|
*
|
||||||
@ -12093,7 +12093,7 @@ io_s_readlines(VALUE v)
|
|||||||
*
|
*
|
||||||
* - {Open Options}[rdoc-ref:IO@Open+Options].
|
* - {Open Options}[rdoc-ref:IO@Open+Options].
|
||||||
* - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
|
* - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
|
||||||
* - {Line Options}[rdoc-ref:IO@Line+Options].
|
* - {Line Options}[rdoc-ref:IO@Line+IO].
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -983,7 +983,7 @@ class Binding
|
|||||||
# Cooked potato: true
|
# Cooked potato: true
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# See IRB@IRB+Usage for more information.
|
# See IRB@Usage for more information.
|
||||||
def irb(show_code: true)
|
def irb(show_code: true)
|
||||||
IRB.setup(source_location[0], argv: [])
|
IRB.setup(source_location[0], argv: [])
|
||||||
workspace = IRB::WorkSpace.new(self)
|
workspace = IRB::WorkSpace.new(self)
|
||||||
|
@ -948,7 +948,7 @@ num_negative_p(VALUE num)
|
|||||||
* So you should know its esoteric system. See following:
|
* So you should know its esoteric system. See following:
|
||||||
*
|
*
|
||||||
* - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
|
* - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
|
||||||
* - https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#floats_imprecise
|
* - https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#-why-are-rubys-floats-imprecise
|
||||||
* - https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
|
* - https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
|
||||||
*
|
*
|
||||||
* You can create a \Float object explicitly with:
|
* You can create a \Float object explicitly with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user