Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
os: macos-14
- test_task: check
os: macos-15
extra_checks: [capi]
fail-fast: false

env:
Expand Down
7 changes: 3 additions & 4 deletions box.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,17 +1047,16 @@ rb_f_dump_classext(VALUE recv, VALUE klass)
/*
* Document-class: Ruby::Box
*
* Ruby::Box is designed to provide separated spaces in a Ruby
* process, to isolate applications and libraries.
* See {Ruby::Box}[rdoc-ref:box.md].
* :markup: markdown
* :include: doc/_box.md
*/
void
Init_Box(void)
{
tmp_dir = system_tmpdir();
tmp_dir_has_dirsep = (strcmp(tmp_dir + (strlen(tmp_dir) - strlen(DIRSEP)), DIRSEP) == 0);

VALUE mRuby = rb_path2class("Ruby");
VALUE mRuby = rb_define_module("Ruby");

rb_cBox = rb_define_class_under(mRuby, "Box", rb_cModule);
rb_define_method(rb_cBox, "initialize", box_initialize, 0);
Expand Down
4 changes: 2 additions & 2 deletions doc/.document
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.md
*.rb
[^_]*.md
[^_]*.rb
[^_]*.rdoc
contributing
NEWS
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/date/calendars.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See also {a concrete example here}[rdoc-ref:DateTime@When+should+you+use+DateTim
=== Argument +start+

Certain methods in class \Date handle differences in the
{Julian and Gregorian calendars}[rdoc-ref:date/calendars.rdoc@Julian+and+Gregorian+Calendars]
{Julian and Gregorian calendars}[rdoc-ref:@Julian+and+Gregorian+Calendars]
by accepting an optional argument +start+, whose value may be:

- Date::ITALY (the default): the created date is Julian
Expand Down
6 changes: 3 additions & 3 deletions doc/encodings.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ A Ruby String object has an encoding that is an instance of class \Encoding.
The encoding may be retrieved by method String#encoding.

The default encoding for a string literal is the script encoding;
see {Script Encoding}[rdoc-ref:encodings.rdoc@Script+Encoding].
see {Script Encoding}[rdoc-ref:@Script+Encoding].

's'.encoding # => #<Encoding:UTF-8>

Expand All @@ -147,7 +147,7 @@ The default encoding for a string created with method String.new is:
- For no argument, ASCII-8BIT.
- For a \String object argument, the encoding of that string.
- For a string literal, the script encoding;
see {Script Encoding}[rdoc-ref:encodings.rdoc@Script+Encoding].
see {Script Encoding}[rdoc-ref:@Script+Encoding].

In either case, any encoding may be specified:

Expand Down Expand Up @@ -193,7 +193,7 @@ The default encoding for these, however, is:

- US-ASCII, if all characters are US-ASCII.
- The script encoding, otherwise;
see (Script Encoding)[rdoc-ref:encodings.rdoc@Script+Encoding].
see (Script Encoding)[rdoc-ref:@Script+Encoding].

== Filesystem \Encoding

Expand Down
26 changes: 13 additions & 13 deletions doc/format_specifications.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,42 +46,42 @@ The links lead to the details and examples.
=== \Integer Type Specifiers

- +b+ or +B+: Format +argument+ as a binary integer.
See {Specifiers b and B}[rdoc-ref:format_specifications.rdoc@Specifiers+b+and+B].
See {Specifiers b and B}[rdoc-ref:@Specifiers+b+and+B].
- +d+, +i+, or +u+ (all are identical):
Format +argument+ as a decimal integer.
See {Specifier d}[rdoc-ref:format_specifications.rdoc@Specifier+d].
See {Specifier d}[rdoc-ref:@Specifier+d].
- +o+: Format +argument+ as an octal integer.
See {Specifier o}[rdoc-ref:format_specifications.rdoc@Specifier+o].
See {Specifier o}[rdoc-ref:@Specifier+o].
- +x+ or +X+: Format +argument+ as a hexadecimal integer.
See {Specifiers x and X}[rdoc-ref:format_specifications.rdoc@Specifiers+x+and+X].
See {Specifiers x and X}[rdoc-ref:@Specifiers+x+and+X].

=== Floating-Point Type Specifiers

- +a+ or +A+: Format +argument+ as hexadecimal floating-point number.
See {Specifiers a and A}[rdoc-ref:format_specifications.rdoc@Specifiers+a+and+A].
See {Specifiers a and A}[rdoc-ref:@Specifiers+a+and+A].
- +e+ or +E+: Format +argument+ in scientific notation.
See {Specifiers e and E}[rdoc-ref:format_specifications.rdoc@Specifiers+e+and+E].
See {Specifiers e and E}[rdoc-ref:@Specifiers+e+and+E].
- +f+: Format +argument+ as a decimal floating-point number.
See {Specifier f}[rdoc-ref:format_specifications.rdoc@Specifier+f].
See {Specifier f}[rdoc-ref:@Specifier+f].
- +g+ or +G+: Format +argument+ in a "general" format.
See {Specifiers g and G}[rdoc-ref:format_specifications.rdoc@Specifiers+g+and+G].
See {Specifiers g and G}[rdoc-ref:@Specifiers+g+and+G].

=== Other Type Specifiers

- +c+: Format +argument+ as a character.
See {Specifier c}[rdoc-ref:format_specifications.rdoc@Specifier+c].
See {Specifier c}[rdoc-ref:@Specifier+c].
- +p+: Format +argument+ as a string via <tt>argument.inspect</tt>.
See {Specifier p}[rdoc-ref:format_specifications.rdoc@Specifier+p].
See {Specifier p}[rdoc-ref:@Specifier+p].
- +s+: Format +argument+ as a string via <tt>argument.to_s</tt>.
See {Specifier s}[rdoc-ref:format_specifications.rdoc@Specifier+s].
See {Specifier s}[rdoc-ref:@Specifier+s].
- <tt>%</tt>: Format +argument+ (<tt>'%'</tt>) as a single percent character.
See {Specifier %}[rdoc-ref:format_specifications.rdoc@Specifier+-25].
See {Specifier %}[rdoc-ref:@Specifier+-25].

== Flags

The effect of a flag may vary greatly among type specifiers.
These remarks are general in nature.
See {type-specific details}[rdoc-ref:format_specifications.rdoc@Type+Specifier+Details+and+Examples].
See {type-specific details}[rdoc-ref:@Type+Specifier+Details+and+Examples].

Multiple flags may be given with single type specifier;
order does not matter.
Expand Down
2 changes: 1 addition & 1 deletion doc/packed_data.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Any directive may be followed by either of these modifiers:
'AB'.unpack('C3') # => [65, 66, nil]

Note: Directives in <tt>%w[A a Z m]</tt> use +count+ differently;
see {String Directives}[rdoc-ref:packed_data.rdoc@String+Directives].
see {String Directives}[rdoc-ref:@String+Directives].

If elements don't fit the provided directive, only least significant bits are encoded:

Expand Down
70 changes: 35 additions & 35 deletions doc/ruby/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ nil

See also:

- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]:
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]:
`-n`, with printing.

### `-a`: Split Input Lines into Fields
Expand All @@ -98,15 +98,15 @@ and the default field separator is `$;`.

See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
Set `$/` (input record separator).
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]:
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]:
`-n`, with printing.

### `-c`: Check Syntax
Expand Down Expand Up @@ -228,15 +228,15 @@ The argument must immediately follow the option

See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]:
`-n`, with printing.

### `-h`: Print Short Help Message
Expand Down Expand Up @@ -314,15 +314,15 @@ $ ruby -ln -e 'p $_' desiderata.txt

See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]:
Set input field separator.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]:
`-n`, with printing.

### `-n`: Run Program in `gets` Loop
Expand All @@ -348,15 +348,15 @@ be on good terms with all persons.

See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]:
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
Set output record separator; chop lines.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]:
`-n`, with printing.

### `-p`: `-n`, with Printing
Expand All @@ -377,15 +377,15 @@ be on good terms with all persons.

See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]:
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.

### `-r`: Require Library
Expand Down Expand Up @@ -434,7 +434,7 @@ $ ruby -s t.rb -foo=baz -bar=bat
```

The option may not be used with
{option -e}[rdoc-ref:ruby/options.md@e-3A+Execute+Given+Ruby+Code]
{option -e}[rdoc-ref:@e-3A+Execute+Given+Ruby+Code]

### `-S`: Search Directories in `ENV['PATH']`

Expand Down Expand Up @@ -583,7 +583,7 @@ ruby - Copyright (C) 1993-2024 Yukihiro Matsumoto
### `--debug`: Alias for `-d`

Option `--debug` is an alias for
{option -d}[rdoc-ref:ruby/options.md@d-3A+Set+-24DEBUG+to+true].
{option -d}[rdoc-ref:@d-3A+Set+-24DEBUG+to+true].

### `--disable`: Disable Features

Expand Down Expand Up @@ -617,9 +617,9 @@ option was given:
- `--dump=help`:
Same as {option \-\-help}[options_md.html#label--help-3A+Print+Help+Message].
- `--dump=syntax`:
Same as {option -c}[rdoc-ref:ruby/options.md@c-3A+Check+Syntax].
Same as {option -c}[rdoc-ref:@c-3A+Check+Syntax].
- `--dump=usage`:
Same as {option -h}[rdoc-ref:ruby/options.md@h-3A+Print+Short+Help+Message].
Same as {option -h}[rdoc-ref:@h-3A+Print+Short+Help+Message].
- `--dump=version`:
Same as {option \-\-version}[options_md.html#label--version-3A+Print+Ruby+Version].

Expand All @@ -641,7 +641,7 @@ see {option --disable}[options_md.html#label--disable-3A+Disable+Features].
### `--encoding`: Alias for `-E`.

Option `--encoding` is an alias for
{option -E}[rdoc-ref:ruby/options.md@E-3A+Set+Default+Encodings].
{option -E}[rdoc-ref:@E-3A+Set+Default+Encodings].

### `--external-encoding`: Set Default External \Encoding

Expand Down
7 changes: 3 additions & 4 deletions doc/strftime_formatting.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ the only required part is the conversion specifier, so we begin with that.
t = Time.now # => 2022-06-29 07:10:20.3230914 -0500
t.strftime('%N') # => "323091400" # Default.

Use {width specifiers}[rdoc-ref:strftime_formatting.rdoc@Width+Specifiers]
Use {width specifiers}[rdoc-ref:@Width+Specifiers]
to adjust units:

t.strftime('%3N') # => "323" # Milliseconds.
Expand Down Expand Up @@ -522,6 +522,5 @@ An ISO 8601 combined date and time representation may be any
ISO 8601 date and any ISO 8601 time,
separated by the letter +T+.

For the relevant +strftime+ formats, see
{Dates}[rdoc-ref:strftime_formatting.rdoc@Dates]
and {Times}[rdoc-ref:strftime_formatting.rdoc@Times] above.
For the relevant +strftime+ formats, see {Dates}[rdoc-ref:@Dates] and
{Times}[rdoc-ref:@Times] above.
2 changes: 1 addition & 1 deletion doc/syntax/assignment.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Assignment creates a local variable if the variable was not previously
referenced.

An assignment expression result is always the assigned value, including
{assignment methods}[rdoc-ref:syntax/assignment.rdoc@Assignment+Methods].
{assignment methods}[rdoc-ref:@Assignment+Methods].

== Local Variable Names

Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Init_version(void)
* The constants defined here are aliased in the toplevel with
* +RUBY_+ prefix.
*/
VALUE mRuby = rb_path2class("Ruby");
VALUE mRuby = rb_define_module("Ruby");

enum {ruby_patchlevel = RUBY_PATCHLEVEL};
VALUE version = MKSTR(version);
Expand Down