1682 Commits

Author SHA1 Message Date
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
BurdetteLamar
1443f89d69 [DOC] Tweaks for String#unicode_normalize 2025-11-18 18:57:29 -08:00
Burdette Lamar
319001192d
[DOC] Tweaks for String#dump and String#undump 2025-11-18 21:56:14 -05:00
Stan Lo
85abc59c32 [DOC] Add documentation about Ruby's VM stack 2025-11-18 16:43:24 +08:00
Earlopain
d66b37e3d8 Remove alternation pattern matching handling from the prism compiler
Since https://github.com/ruby/ruby/pull/15212 these are proper syntax
errors, so no need to handle this explicitly anymore.

Also updated the example in the docs for this
2025-11-17 10:11:40 -05:00
Nobuyoshi Nakada
577cf5e384
[DOC] Remove an obsolete file
It has been merged into `doc/ruby/options.md` with
`field_processing.md` at ruby/ruby#10138.
2025-11-15 12:23:44 +09:00
Herwin
f1765cd402 [Doc] Remove leftover references to namespace from box.md
And fix the indentation a little bit, since `box` is one character
longer than `ns`.
2025-11-15 10:18:56 +09:00
Mari Imaizumi
cb3bc8ae3f [Feature #21275] Bump Unicode version to 17.0.0 2025-11-14 12:27:36 +09:00
Burdette Lamar
14e75435ea
[DOC] Tweaks for String#to_r 2025-11-12 05:13:29 -05:00
Burdette Lamar
75d25a42e6
[DOC] Tweaks for String#to_c 2025-11-08 10:08:09 -05:00
Satoshi Tagomori
8ebeb751ee Update Ruby Box document, delete problems/discussions already resolved 2025-11-07 13:14:54 +09:00
Satoshi Tagomori
ccad753c64 Re-rename files wrongly renamed 2025-11-07 13:14:54 +09:00
Satoshi Tagomori
50b9d9d355 rename namespace.c (and others) to box.c 2025-11-07 13:14:54 +09:00
Randy Stauner
00c9a21cce
[DOC] Update glossary (#15070) 2025-11-05 17:29:38 -08:00
Burdette Lamar
554a78daab [ruby/stringio] [DOC] Doc for StringIO.getc
(https://github.com/ruby/stringio/pull/163)

https://github.com/ruby/stringio/commit/a126fe252f
2025-11-04 23:57:52 +00:00
Burdette Lamar
15e64bd2e6 [ruby/stringio] [DOC] Doc for StringIO#gets
(https://github.com/ruby/stringio/pull/164)

https://github.com/ruby/stringio/commit/10e991e31d
2025-11-04 01:09:55 +00:00
Burdette Lamar
be495013a7 [ruby/stringio] [DOC] Doc for StringIO#getbyte
(https://github.com/ruby/stringio/pull/162)

https://github.com/ruby/stringio/commit/95a7dd592c
2025-11-04 00:59:03 +00:00
Stan Lo
750c75096d
[DOC] ZJIT: Add documentation about native stack and Ruby's VM stack (#14993)
ZJIT: Add documentation about native stack and Ruby's VM stack
2025-10-30 00:35:35 +00:00
Hiroshi SHIBATA
6e618a2c79
Added repl_type_completor to bundled gems section 2025-10-29 16:48:50 +09:00
Hiroshi SHIBATA
e1a0bcde76
Added missing rubygems pages for default/bundled gems 2025-10-29 14:12:22 +09:00
Astra
7bc7246956
[DOC] Update refinements.rdoc
removes documentation for the activation order of `include` and `prepend` inside a refinement
2025-10-29 10:47:11 +09:00
Nobuyoshi Nakada
0f5c69b317 [DOC] Moved non ASCII documents to separated files
C99 does not declare ways to designate the charset encoding of the
source file.  We can assume just US-ASCII characters will be safe.
2025-10-28 13:07:59 +09:00
BurdetteLamar
836fc00e19 [DOC] Tweaks for String#swapcase 2025-10-27 21:19:42 -04:00
BurdetteLamar
bf2663ce06 [DOC] Tweaks for String#sum 2025-10-27 21:14:54 -04:00
Nobuyoshi Nakada
d0a6780d1e [ruby/stringio] [DOC] Split the examples StringIO into the document file
https://github.com/ruby/stringio/commit/04ba28af00
2025-10-27 07:53:15 +00:00
Burdette Lamar
5c683bd9b3
[DOC] Tweaks for String#succ 2025-10-26 15:04:16 -04:00
BurdetteLamar
245df86ec3 [DOC] Tweaks for String#sub 2025-10-24 18:09:32 -04:00
Hiroshi SHIBATA
0eaea7bdd3
thwait has been extracted to http://github.com/ruby/thwait 2025-10-24 11:56:21 +09:00
Hiroshi SHIBATA
7aac92abe8
Update the primary maintainer of rubygems 2025-10-24 11:43:24 +09:00
Hiroshi SHIBATA
f388647ecc
Added policy of bundled gems 2025-10-24 11:42:04 +09:00
Hiroshi SHIBATA
b58b89b920
Revised structure of maintenance policy 2025-10-24 11:41:45 +09:00
Hiroshi SHIBATA
f31cd3759b
Revised unmaintained to reflect the current situation 2025-10-24 11:29:52 +09:00
Hiroshi SHIBATA
daca69c8e9
Restore primary maintainer name at the bundled gems 2025-10-24 11:14:34 +09:00
BurdetteLamar
8b0d405337 [DOC] Tweaks for String#start_with? 2025-10-23 18:12:42 -04:00
BurdetteLamar
d4ea1686b5 [DOC] Tweaks for String#split 2025-10-22 18:13:58 -04:00