1716 Commits

Author SHA1 Message Date
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
Peter Zhu
fb80f84fc7 [DOC] Fix formatting in docs for String#[]= 2025-12-06 17:59:50 -08:00
Nobuyoshi Nakada
d490247df2
[DOC] Link global variables to command line options 2025-12-06 14:39:47 +09:00
Burdette Lamar
21f9a647fb [ruby/stringio] [DOC] Class doc for StringIO
(https://github.com/ruby/stringio/pull/178)

https://github.com/ruby/stringio/commit/6449251678
2025-12-05 22:08:29 -05:00
BurdetteLamar
bd64cf00a2 [DOC] Tweaks for String#capitalize 2025-12-05 19:05:55 -08:00
BurdetteLamar
2491a504ff [DOC] Tweaks for String#downcase 2025-12-05 19:05:18 -08:00
BurdetteLamar
e5e4175dbd [DOC] Tweaks for String#upcase 2025-12-05 19:04:59 -08:00
BurdetteLamar
da2c67388a [DOC] Tweaks for String#swapcase 2025-12-05 19:04:23 -08:00
BurdetteLamar
bbef73b2ff [DOC] Better multibyte-character data 2025-12-05 19:03:22 -08:00
Nobuyoshi Nakada
1cad20e2d5
[DOC] Describe $F
This variation is used when `-a` option is given.
2025-12-05 16:47:39 +09:00
Nobuyoshi Nakada
1e7373ef30
[DOC] Describe the global variables set by command line options
These variables are set by command line options, but it is deprecated
to assign them any value other than nil in ruby code.
2025-12-05 16:31:36 +09:00
Nobuyoshi Nakada
b35aff5813
[DOC] Centerize Variable, English, and Constant columns 2025-12-05 16:14:15 +09:00
Koichi Sasada
2aaea665bb fix typo s/sharable/shareable/ 2025-12-05 03:10:50 +09:00
Nobuyoshi Nakada
8099e9d2d1
[DOC] Fix a macro name 2025-12-04 18:08:23 +09:00
Burdette Lamar
6e723bee45
[DOC] About Float Imprecision (#15293) 2025-12-02 21:41:21 -05:00
Yuki Kurihara
a63147eed1 [ruby/strscan] [DOC] Avoid being interpreted as a link
(https://github.com/ruby/strscan/pull/180)

Since `[](n)` is being interpreted as a Markdown link, it cannot be
displayed as a method call.
I have corrected this by escaping the brackets so that they are
interpreted as strings rather than links.

### Before

ri

```
    #{}[n]     |   <tt>n</tt>th captured substring.    |       +nil+.
```

html

<img width="424" height="217" alt="image"
src="https://github.com/user-attachments/assets/b45601ab-ed1c-4b82-b112-325f12bde197"
/>

### After

ri

```
    #[](n)     |   <tt>n</tt>th captured substring.    |       +nil+.
```

html

<img width="489" height="217" alt="image"
src="https://github.com/user-attachments/assets/1212c147-42a5-4f62-8667-a279ccff67a3"
/>

https://github.com/ruby/strscan/commit/b3d56867fd
2025-12-02 22:24:29 +00:00
Benoit Daloze
e515fa7ab1 ZJIT: Improve documentation and make it easy to generate the types graph 2025-12-02 10:35:16 +01:00
Berkan Ünal
e68fcf111b [ruby/strscan] [DOC] Fix broken link to helper methods
(https://github.com/ruby/strscan/pull/179)

### Helper methods link is broken at master branch

To reproduce
1. go to [StringScanner
docs](https://docs.ruby-lang.org/en/master/StringScanner.html)
2. Click to link at line
   > See examples at **helper_methods**
3. Resolved url gives 404:
https://docs.ruby-lang.org/en/master/strscan/helper_methods_md.html

### Fix

Currently link resolves as `href="doc/strscan/helper_methods_md.html"`
Correct link should be resolved as `href="helper_methods_md.html"`

https://github.com/ruby/strscan/commit/adb8678aa6
2025-12-01 22:02:40 +00:00
Aiden Fox Ivey
f92001344d
ZJIT: Fix erroneous version number for Iongraph (#15357)
As per
8d5e531305/src/iongraph.ts (L147),
correct version number for the web-based tool is 1, rather than 2.
2025-12-01 10:02:35 -08:00
Stan Lo
5b1ed1ef20
[DOC] Remove unneeded filename from rdoc-ref links (#15339) 2025-11-27 23:31:32 +00:00
Stan Lo
4cd6661e18
Reorganize page documentations (#15154)
Re-organize page docs
2025-11-27 20:12:24 +00:00
Sebastian Dufner
a2c12d3ffe Documentation: Added the |(pipe)/OR operator to syntax/methods.
It was not documented as an operator that can be overriden, which is confusing because it makes you think it can't be.
2025-11-27 15:48:10 +09:00
Nobuyoshi Nakada
1738255f6d
[Misc #21688] [DOC] Include box.md in Ruby::Box documentation 2025-11-23 19:04:17 +09:00
Nobuyoshi Nakada
422ed7489f [ruby/date] [DOC] Remove the name from same file references
https://github.com/ruby/date/commit/e41082e068
2025-11-23 09:08:52 +00:00
Nobuyoshi Nakada
fed528a995
[DOC] Remove the name from same file references 2025-11-23 17:56:11 +09:00
BurdetteLamar
55938a45e8 [DOC] Sort some methods in What's Here 2025-11-20 14:08:15 -08:00
Burdette Lamar
d5368fc515
[DOC] Tweaks for String#valid_encoding? 2025-11-20 17:07:44 -05:00
BurdetteLamar
d1b11592af [DOC] Tweaks for String#upto 2025-11-20 14:06:16 -08:00
Burdette Lamar
59e0489248
[DOC] Tweaks for String#upcase (#15244) 2025-11-20 17:03:58 -05:00
Aiden Fox Ivey
2ed287da17
ZJIT: Add Iongraph compatibility (#14999)
## Components

This PR adds functionality to visualize HIR using the [Iongraph](https://spidermonkey.dev/blog/2025/10/28/iongraph-web.html) tool first created for use with Spidermonkey.

## Justification

Iongraph's viewer is (as mentioned in the article above) a few notches above graphviz for viewing large CFGs. It also allows easily inspecting different compiler optimization passes and multiple functions in the same browser window. Since Spidermonkey is using this format, it may be beneficial to use it for our own JIT development.

The requirement for JSON is downstream from that of the Iongraph format. As for writing the implementation myself, ZJIT leans towards having fewer dependencies, so this is the preferred approach.

## How does it look?

<img width="902" height="957" alt="image" src="https://github.com/user-attachments/assets/e4e0991b-572a-41fd-9fed-1215bd1926c3" />

<img width="770" height="624" alt="image" src="https://github.com/user-attachments/assets/01398373-1f75-46b8-b1aa-7f5d4cbca6b8" />

Right now, it's aesthetically minimal, but is fairly robust.

## Functionality

Using `--zjit-dump-hir-iongraph` will dump all compiled functions into a directory named `/tmp/zjit-iongraph-{PROCESS_PID}`. Each file will be named `func_{ZJIT_FUNC_NAME}.json`. In order to use them in the Iongraph viewer, you'll need to use `jq` to collate them to a single file. An example invocation of `jq` is shown below for reference. The name of the file created does not matter to my understanding.

`jq --slurp --null-input '.functions=inputs | .version=2' /tmp/zjit-iongraph-{PROCESS_PID}/func*.json > ~/Downloads/foo.json`

From there, you can use https://mozilla-spidermonkey.github.io/iongraph/ to view your trace.

### Caveats

- The upstream Iongraph viewer doesn't allow you to click arguments to an instruction to find the instruction that they originate from when using the format that this PR generates. (I have made a small fork at https://github.com/aidenfoxivey/iongraph that fixes that functionality via 9e9c29b41c.patch)
- The upstream Iongraph viewer can sometimes show "exiting edges" in the CFG as being not attached to the box representing its basic block.

<img width="1814" height="762" alt="image" src="https://github.com/user-attachments/assets/afbbaa16-332f-498f-849e-11c69a8cb0cc" />

(Image courtesy of @tekknolagi)

This is because the original tool was (to our understanding) written for an SSA format that does not use extended basic blocks. (Extended basic blocks let you put a jump instruction, conditional or otherwise, anywhere in the basic block.) This means that our format may generate more outgoing edges than the viewer is written to handle.
2025-11-19 23:00:44 +00:00
Stan Lo
63a6290ce0 [DOC] Update yjit.md to use a different email 2025-11-19 22:54:35 +00:00