<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism_compile.c, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[Backport #21832] Add pushtoarray insn to fix segfault with forwarding + splat (#15870)</title>
<updated>2026-01-14T18:02:51+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2026-01-14T18:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=33cae95c8afce2782c2808a8e74c81d9ac763a4e'/>
<id>33cae95c8afce2782c2808a8e74c81d9ac763a4e</id>
<content type='text'>
Add pushtoarray insn to fix segfault with forwarding + splat

Example insns diff for `def x = [3]; def a(...) = b(*x, 2, 3, ...)`

     == disasm: #&lt;ISeq:a@-e:1 (1,13)-(1,42)&gt;
     local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
     [ 1] "..."@0
     0000 putself                                                          (   1)[Ca]
     0000 putself
     0000 opt_send_without_block                 &lt;calldata!mid:x, argc:0, FCALL|VCALL|ARGS_SIMPLE&gt;
     0000 splatarray                             true
     0000 putobject                              2
     0000 putobject                              3
    +0000 pushtoarray                            2
     0000 getlocal_WC_0                          "..."@0
     0000 sendforward                            &lt;calldata!mid:b, argc:1, ARGS_SPLAT|ARGS_SPLAT_MUT|FCALL|FORWARDING&gt;, nil
     0000 leave                                  [Re]

This matches the insns produced by parse.y</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add pushtoarray insn to fix segfault with forwarding + splat

Example insns diff for `def x = [3]; def a(...) = b(*x, 2, 3, ...)`

     == disasm: #&lt;ISeq:a@-e:1 (1,13)-(1,42)&gt;
     local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
     [ 1] "..."@0
     0000 putself                                                          (   1)[Ca]
     0000 putself
     0000 opt_send_without_block                 &lt;calldata!mid:x, argc:0, FCALL|VCALL|ARGS_SIMPLE&gt;
     0000 splatarray                             true
     0000 putobject                              2
     0000 putobject                              3
    +0000 pushtoarray                            2
     0000 getlocal_WC_0                          "..."@0
     0000 sendforward                            &lt;calldata!mid:b, argc:1, ARGS_SPLAT|ARGS_SPLAT_MUT|FCALL|FORWARDING&gt;, nil
     0000 leave                                  [Re]

This matches the insns produced by parse.y</pre>
</div>
</content>
</entry>
<entry>
<title>Binding#implicit_parameters, etc. support the implicit "it" parameter</title>
<updated>2025-12-12T14:24:50+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2025-12-12T07:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=129d74c96b0b8f1b93704b34e66d2c18f4835e1b'/>
<id>129d74c96b0b8f1b93704b34e66d2c18f4835e1b</id>
<content type='text'>
[Bug #21049]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21049]
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove alternation pattern matching handling from the prism compiler</title>
<updated>2025-11-17T15:11:40+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-11-17T12:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d66b37e3d8737451ae76b40823641582bd451f8f'/>
<id>d66b37e3d8737451ae76b40823641582bd451f8f</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Correctly compile splats in for-loop index in prism</title>
<updated>2025-10-27T15:28:41+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-10-27T12:17:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0b0da6c4b26f80ad6985722d3fc0f5cdee09125d'/>
<id>0b0da6c4b26f80ad6985722d3fc0f5cdee09125d</id>
<content type='text'>
Fixes [Bug #21648]

This is a followup to https://github.com/ruby/ruby/pull/13597.
The added test passed but didn't emit the same instructions.

This also handles bare splats and aligns instructions for all cases
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21648]

This is a followup to https://github.com/ruby/ruby/pull/13597.
The added test passed but didn't emit the same instructions.

This also handles bare splats and aligns instructions for all cases
</pre>
</div>
</content>
</entry>
<entry>
<title>use `SET_SHAREABLE`</title>
<updated>2025-10-23T04:08:26+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2025-09-24T20:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc00c4468e0054ca896d2b83d3020180915f64cf'/>
<id>bc00c4468e0054ca896d2b83d3020180915f64cf</id>
<content type='text'>
to adopt strict shareable rule.

* (basically) shareable objects only refer shareable objects
* (exception) shareable objects can refere unshareable objects
  but should not leak reference to unshareable objects to Ruby world
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to adopt strict shareable rule.

* (basically) shareable objects only refer shareable objects
* (exception) shareable objects can refere unshareable objects
  but should not leak reference to unshareable objects to Ruby world
</pre>
</div>
</content>
</entry>
<entry>
<title>For prism parser, do not update $_ from STDIN</title>
<updated>2025-10-11T19:08:07+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-10-10T19:06:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d036dc0a794d87309f912e7585749c681c2438f5'/>
<id>d036dc0a794d87309f912e7585749c681c2438f5</id>
<content type='text'>
Fixes [Bug #21635]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21635]
</pre>
</div>
</content>
</entry>
<entry>
<title>Interpolation with only string literals must not be frozen</title>
<updated>2025-10-01T19:22:51+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-10-01T18:25:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=77aaa6ab0a475b8a57b1de4aa1f1210e4f85a803'/>
<id>77aaa6ab0a475b8a57b1de4aa1f1210e4f85a803</id>
<content type='text'>
Basically a redo of https://github.com/ruby/ruby/commit/a1403fb7cbd1fe0df97c932be9814c86081783dc
but respecting the frozen string literal magic comment

Fixes [Bug #21187]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Basically a redo of https://github.com/ruby/ruby/commit/a1403fb7cbd1fe0df97c932be9814c86081783dc
but respecting the frozen string literal magic comment

Fixes [Bug #21187]
</pre>
</div>
</content>
</entry>
<entry>
<title>Ractor.shareable_proc</title>
<updated>2025-09-23T18:59:03+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2025-07-17T06:38:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=55b1ba3bf276ba82173bd961fb8e0f08bf4182a6'/>
<id>55b1ba3bf276ba82173bd961fb8e0f08bf4182a6</id>
<content type='text'>
call-seq:
  Ractor.sharable_proc(self: nil){} -&gt; sharable proc

It returns shareable Proc object. The Proc object is
shareable and the self in a block will be replaced with
the value passed via `self:` keyword.

In a shareable Proc, the outer variables should
* (1) refer shareable objects
* (2) be not be overwritten

```ruby
  a = 42
  Ractor.shareable_proc{ p a }
  #=&gt; OK

  b = 43
  Ractor.shareable_proc{ p b; b = 44 }
  #=&gt; Ractor::IsolationError because 'b' is reassigned in the block.

  c = 44
  Ractor.shareable_proc{ p c }
  #=&gt; Ractor::IsolationError because 'c' will be reassigned outside of the block.
  c = 45

  d = 45
  d = 46 if cond
  Ractor.shareable_proc{ p d }
  #=&gt; Ractor::IsolationError because 'd' was reassigned outside of the block.
```

The last `d`'s case can be relaxed in a future version.

The above check will be done in a static analysis at compile time,
so the reflection feature such as `Binding#local_varaible_set`
can not be detected.

```ruby
  e = 42
  shpr = Ractor.shareable_proc{ p e } #=&gt; OK
  binding.local_variable_set(:e, 43)
  shpr.call #=&gt; 42 (returns captured timing value)
```

Ractor.sharaeble_lambda is also introduced.
[Feature #21550]
[Feature #21557]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
call-seq:
  Ractor.sharable_proc(self: nil){} -&gt; sharable proc

It returns shareable Proc object. The Proc object is
shareable and the self in a block will be replaced with
the value passed via `self:` keyword.

In a shareable Proc, the outer variables should
* (1) refer shareable objects
* (2) be not be overwritten

```ruby
  a = 42
  Ractor.shareable_proc{ p a }
  #=&gt; OK

  b = 43
  Ractor.shareable_proc{ p b; b = 44 }
  #=&gt; Ractor::IsolationError because 'b' is reassigned in the block.

  c = 44
  Ractor.shareable_proc{ p c }
  #=&gt; Ractor::IsolationError because 'c' will be reassigned outside of the block.
  c = 45

  d = 45
  d = 46 if cond
  Ractor.shareable_proc{ p d }
  #=&gt; Ractor::IsolationError because 'd' was reassigned outside of the block.
```

The last `d`'s case can be relaxed in a future version.

The above check will be done in a static analysis at compile time,
so the reflection feature such as `Binding#local_varaible_set`
can not be detected.

```ruby
  e = 42
  shpr = Ractor.shareable_proc{ p e } #=&gt; OK
  binding.local_variable_set(:e, 43)
  shpr.call #=&gt; 42 (returns captured timing value)
```

Ractor.sharaeble_lambda is also introduced.
[Feature #21550]
[Feature #21557]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix prism error messages with multibyte truncation</title>
<updated>2025-09-13T13:44:57+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-09-13T01:13:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d781d69a06e7d4eef3334e44a25b02d05bad1e2d'/>
<id>d781d69a06e7d4eef3334e44a25b02d05bad1e2d</id>
<content type='text'>
When a line is going to be displayed in an error message that
contains multibyte characters, we need to respect the encoding
of the source and truncate only at a character boundary, as
opposed to a raw byte boundary.

Fixes [Bug #21528]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a line is going to be displayed in an error message that
contains multibyte characters, we need to respect the encoding
of the source and truncate only at a character boundary, as
opposed to a raw byte boundary.

Fixes [Bug #21528]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fill in lead num for blocks with `it`</title>
<updated>2025-09-13T13:43:59+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-09-13T00:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f4b4e3b37c884093a165801b5028c14a7de1604'/>
<id>4f4b4e3b37c884093a165801b5028c14a7de1604</id>
<content type='text'>
Fixes [Bug #21256]

Co-Authored-By: Earlopain &lt;14981592+Earlopain@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21256]

Co-Authored-By: Earlopain &lt;14981592+Earlopain@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
