1746 Commits

Author SHA1 Message Date
tkling
9db0a8c7db [DOC] zjit: small typo fix
prerequists -> prerequisites
2026-01-13 10:36:15 -05:00
Hiroshi SHIBATA
9c49084a20 Update tsort entries under the doc 2026-01-08 18:48:00 +09:00
Burdette Lamar
5230f835e8
[DOC] Harmonize #[] methods 2026-01-07 18:01:56 -05:00
Brandon Zylstra
c65a5548a8 Update box.md
"Code" (when used to refer to what we create in Ruby or any other programming language) is an abstract non-count noun, so it cannot be pluralized.  ("Codes" would be used when referring to specific countable things like PIN codes, which is a different use of the word "code".)

This is somewhat confusing because English allows converting count nouns into non-count nouns, and converting non-count nouns into count nouns, and because many words have both forms.

For an example of converting a non-count noun to a count noun, "water" is normally a non-count noun:

> The world is covered with water.

but people who work in restaurants often use the word as a count noun, as a shorthand for "cup of water":

> I need 7 waters on the big table by the window.

For an example of the opposite conversion, "worm" is normally a count noun:

> There are lots of worms in the puddle.

but someone might use it as a non-count noun when talking about non-distinct remains of worms:

> You have worm all over the bottom of your shoe!

So although a given noun can be flexible enough to be used in either way—even when it is unconventional—there is a definite change of meaning when using a word as a count noun or a non-count noun.
2026-01-05 17:11:06 +09:00
Koichi ITO
ca0fece56a [DOC] Tweak an example in language/box.md
Although the example code comments indicate that it returns `false`,
a non-matching result for `=~` is actually `nil`.

```ruby
Foo.foo.blank? #=> false
"foo".blank?   #=> false
```

https://github.com/ruby/ruby/blob/v4.0.0-preview3/doc/language/box.md?plain=1#L115-L122

This PR replaces `=~` with `match?` so that it returns the expected `false`.
Since this makes the result a boolean, it also aligns with the expected behavior of
a predicate method name like `blank?`.
2026-01-04 12:53:42 +09:00
Koichi ITO
d8d41d7441 [DOC] Use Ruby::Box#require_relative in box.md examples
Based on the example, it appears that `foo.rb` and `main.rb` are expected to be in the same directory.
Since Ruby 1.9, the current directory is not included in `$LOAD_PATH` by default.
As a result, running `box.require('foo')` as shown in the sample code raises a `LoadError`:

```console
main.rb:2:in `Ruby::Box#require': cannot load such file -- foo (LoadError)
        from main.rb:2:in `<main>'
```

To avoid this, it seems simplest to show either `box.require('./foo')` or `box.require_relative('foo')`.
In this PR, `box.require('foo')` is replaced with `box.require_relative('foo')` to make the intention of
using a relative path explicit.

This should reduce the chance that users trying Ruby Box will run into an unexpected error.
2026-01-04 12:52:40 +09:00
Burdette Lamar
d615dbf4e2
[DOC] Japanese for multi-byte characters 2025-12-28 15:51:10 -05:00
BurdetteLamar
8415f8facc [DOC] Use Japanese for multi-byte characters 2025-12-27 13:28:57 -05:00
BurdetteLamar
a92c0342dd [DOC] Japanese only for multi-byte chars examples 2025-12-27 10:59:48 -05:00
BurdetteLamar
38d24294ac [DOC] Multibyte chars Japanese only 2025-12-27 10:59:23 -05:00
Burdette Lamar
dedde99676
[DOC] Use Japanese for multi-byte characters (#15745) 2025-12-26 14:06:21 -06:00
Jean Boussier
b304c149aa [DOC] Remove outdated documentation about command injection
[Feature #19630]

This dangerous behavior was removed in 4.0 (996cae65f3cc8fed60c6bb758b00882cac49389d)
but the documentation wasn't updated.
2025-12-26 13:05:29 +01:00
Burdette Lamar
ae46f916f1 [ruby/stringio] [DOC] Doc for StringIO#read
(https://github.com/ruby/stringio/pull/197)

Previous doc merely linked to `IO#read`; new doc stays local, shows
examples using `StringIO`.

https://github.com/ruby/stringio/commit/e8b66f8cdd
2025-12-26 11:00:51 +09:00
Burdette Lamar
9a76ccdbab [ruby/stringio] [DOC] Doc for StringIO#putc
(https://github.com/ruby/stringio/pull/196)

Previous doc merely linked to `IO#putc`. The new doc stays local,
provides examples using `StringIO` objects.

https://github.com/ruby/stringio/commit/8983f32c50
2025-12-26 11:00:51 +09:00
Burdette Lamar
354dc574de [ruby/stringio] [DOC] Doc for StringIO#pread
(https://github.com/ruby/stringio/pull/195)

Previous doc unhelpfully pointed to `IO#pread`; this PR documents
locally, with StringIO examples.

https://github.com/ruby/stringio/commit/806f3d9741
2025-12-26 11:00:51 +09:00
Yukihiro "Matz" Matsumoto
99e9ca1f40
[DOC] Flush NEWS.md 2025-12-26 08:59:22 +09:00
Nobuyoshi Nakada
d375bcc965
[DOC] Escape capitalized word "data" not to be linked unexpectedly 2025-12-25 11:56:41 +09:00
Nobuyoshi Nakada
b908306f99 [DOC] Reword "Regular Expression" to "Matched Data"
`$~` and its accessors are related to regular expressions, but are not
themselves.
2025-12-25 11:49:32 +09:00
NARUSE, Yui
285e22edc5 Revert "Add link to Ruby options doc in help text"
This reverts commit 31ff07ed1eb05d01f7da3c017d542137a3db1e94.

* Don't add a test which only runs on production release
  * https://github.com/ruby/actions/actions/runs/20486784889/job/58870959976
* Don't add a new line to `ruby --help`
  * https://github.com/ruby/ruby/pull/14142#issuecomment-3689829564
2025-12-24 22:55:44 +09:00
Burdette Lamar
ab683d56bc
[DOC] Cross-links between Japanese and English pages (#15705)
* [DOC] Cross-links between Japanese and English pages
2025-12-23 20:46:57 -06:00
Nobuyoshi Nakada
688c1f6c5e [DOC] Reword "Pattern Matching" to "Regular Expression"
In ruby, since 3.1 at least, the words "Pattern Matching" should refer
the syntax.
2025-12-24 10:46:58 +09:00
Steve
e2a58c45b1 [DOC] Fix minor typo in signals.rdoc 2025-12-24 10:39:49 +09:00
Victor Shepelev
d7d1109099
Describe base code layout rules (#15696)
* Describe base code layout rules

* Enhance optional keyword explanation

* Change the logical operators description
2025-12-23 19:09:41 +02:00
Jeremy Evans
d879f9f696 [DOC] Fix example in Ruby::Box documentation 2025-12-23 09:02:25 +01:00
Burdette Lamar
e69f41a0a8
[DOC] Languages in Examples (#15697)
* [DOC] Languages in Examples

* Update doc/contributing/documentation_guide.md

Co-authored-by: Jeremy Evans <code@jeremyevans.net>

* Update doc/contributing/documentation_guide.md

Co-authored-by: Jeremy Evans <code@jeremyevans.net>

---------

Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2025-12-22 16:52:52 -06:00
Nobuyoshi Nakada
2191768980
[DOC] Refine packed_data.rdoc
* Escape unexpected links
* Remove unnecessary path name from in-file reference
2025-12-22 14:58:51 +09:00
Luke Gruber
d0ec60dc7b
More doc improvements to ractor.md (#15676)
[DOC] More doc improvements to ractor.md
2025-12-21 13:26:10 -05:00
Nobuyoshi Nakada
1bc2a91589
[DOC] Align tables in globals.md
* Align "Contains" column in "Streams" table
* Align some columns vertically
* Remove a duplicate `$-a` description
2025-12-21 11:31:36 +09:00
Luke Gruber
3fee7dd90d
Small improvements to doc/language/ractor.md (#15588)
[DOC] Improvements to doc/language/ractor.md
2025-12-20 15:28:04 -05:00
Burdette Lamar
5cdda61d00
[DOC] Enhancements for globals.md (#15545)
* [DOC] Enhancements for globals.md
2025-12-20 09:26:02 -06:00
Victor Shepelev
ec4ca91319
Small documentation adjustments for new/updated features (#15634)
* Document Range#to_set

* Update Thread#raise and Fiber#raise signatures and docs

* Add reference to String#strip to character_selectors.rdoc

* Update *nil docs when calling methods

* Enhance Array#find and #rfind docs

* Add a notice to Kernel#raise about cause:
2025-12-20 13:07:38 +02:00
Nobuyoshi Nakada
77c3a9e447 Revert pack/unpack support for LEB128
https://bugs.ruby-lang.org/issues/21785#note-10
> It is too late to introduce it in Ruby 4.0, let's aim for 4.1.

This reverts commits:

* d0b72429a93e54f1f956b4aedfc25c57dc7001aa
  Add support for signed and unsigned LEB128 to pack/unpack.

* 68a900e30b4ca1537d7975c3a619fd94fca7b084
  add news for pack / unpack directives
2025-12-20 16:59:51 +09:00
Satoshi Tagomori
49f9c9bff2 Box: [DOC] Uodate the name from Namespace 2025-12-20 16:18:33 +09:00
Alan Wu
bb0637a92f ZJIT: [DOC] Fix link to in-repo file. Mention GNU Make requirement 2025-12-19 21:27:01 -05:00
Nobuyoshi Nakada
f0472f2d49
[Feature #21785] [DOC] LEB128 support 2025-12-19 17:16:15 +09:00
BurdetteLamar
99b915944f [DOC] Russian strings should look Russian 2025-12-18 17:47:18 -05:00
Aaron Patterson
d0b72429a9 Add support for signed and unsigned LEB128 to pack/unpack.
This commit adds a new pack format command `R` and `r` for unsigned and
signed LEB128 encoding.  The "r" mnemonic is because this is a
"vaRiable" length encoding scheme.

LEB128 is used in various formats including DWARF, WebAssembly, MQTT,
and Protobuf.

[Feature #21785]
2025-12-18 14:42:47 -08:00
Max Bernstein
98cac1a75d
Point people to redmine on ZJIT docs (#15499)
Fix https://github.com/Shopify/ruby/issues/900
2025-12-15 19:10:04 -05:00
Peter Zhu
1e76b1f8b2 [DOC] Remove doc/reline
Reline has been moved to a bundled gem, so we don't need the docs anymore.
2025-12-14 21:01:15 -05:00
Alan Wu
c092c294d4 ZJIT: [DOC] Mention build prerequisites 2025-12-11 15:45:56 -05:00
Burdette Lamar
6ec5c5f1c8
[ruby/stringio] [DOC] Doc for StringIO.size
(https://github.com/ruby/stringio/pull/171)

https://github.com/ruby/stringio/commit/95a111017a
2025-12-10 15:18:21 +09:00
Burdette Lamar
b4a1f17058
[ruby/stringio] [DOC] Tweaks for StringIO#each_line
(https://github.com/ruby/stringio/pull/165)

Adds to "Position":  pos inside a character.

Makes a couple of minor corrections.

---------

https://github.com/ruby/stringio/commit/ff332abafa

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
2025-12-10 15:18:15 +09:00
Burdette Lamar
5bc65db555
[ruby/stringio] [DOC] Tweaks for StringIO#gets
(https://github.com/ruby/stringio/pull/190)

https://github.com/ruby/stringio/commit/77209fac20
2025-12-10 15:17:09 +09:00
Burdette Lamar
f623fcc7d0
[ruby/stringio] [DOC] Tweaks for StringIO.getbyte
(https://github.com/ruby/stringio/pull/188)

https://github.com/ruby/stringio/commit/66360ee5f1
2025-12-10 15:16:53 +09:00
BurdetteLamar
668fe01182
[ruby/stringio] [DOC] Fix link
https://github.com/ruby/stringio/commit/e2d24ae8d7
2025-12-10 15:16:39 +09:00
Burdette Lamar
842f91aec0
[ruby/stringio] [DOC] Tweaks for StringIO#getc
(https://github.com/ruby/stringio/pull/189)

https://github.com/ruby/stringio/commit/e3d16d30ed
2025-12-10 15:13:28 +09:00
Nobuyoshi Nakada
1933f1291a
[DOC] Clear one of known issues of Ruby Box 2025-12-09 23:44:06 +09:00
Satoshi Tagomori
e8568bbcf2 [DOC] Update Ruby Box documents (known issues) 2025-12-09 23:08:33 +09:00
Satoshi Tagomori
5ae2bd240f [DOC] Add Ruby::Box on NEWS 2025-12-09 21:36:26 +09:00
Max Bernstein
fd45496f91
Update ZJIT docs (#15449) 2025-12-08 16:59:27 +00:00