<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism_compile.c, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Add pushtoarray insn to fix segfault with forwarding + splat</title>
<updated>2026-01-25T09:18:10+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2026-01-13T01:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=02eb4eec87cbbb14c24b63678aa0cca625777414'/>
<id>02eb4eec87cbbb14c24b63678aa0cca625777414</id>
<content type='text'>
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>
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>merge revision(s) 86320a53002a3adaf35ad7434c70e86747a8b345: [Backport #21326] [Backport #21807]</title>
<updated>2026-01-25T08:20:48+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2026-01-25T08:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=55920677854fe757c36368785f6dfdbce0b49ab7'/>
<id>55920677854fe757c36368785f6dfdbce0b49ab7</id>
<content type='text'>
	[PATCH] Fix compilation for forwarding params in Prism

	[Bug #21326]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] Fix compilation for forwarding params in Prism

	[Bug #21326]
</pre>
</div>
</content>
</entry>
<entry>
<title>Interpolation with only string literals must not be frozen</title>
<updated>2025-12-08T23:30:35+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=6dc27d14a0427da7b28a6884578009a9740f69fd'/>
<id>6dc27d14a0427da7b28a6884578009a9740f69fd</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>Interpolated strings must not be frozen</title>
<updated>2025-12-08T23:30:35+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2025-07-22T00:13:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc40e758307c9be3e39497b5010fbaceb14bf8c7'/>
<id>bc40e758307c9be3e39497b5010fbaceb14bf8c7</id>
<content type='text'>
Strings concatenated with backslash may end up being frozen when they
shouldn't be.  This commit fixes the issue.  It required a change
upstream in Prism, but also a change to the Prism compiler in CRuby.

  https://github.com/ruby/prism/pull/3606

[Bug #21187]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Strings concatenated with backslash may end up being frozen when they
shouldn't be.  This commit fixes the issue.  It required a change
upstream in Prism, but also a change to the Prism compiler in CRuby.

  https://github.com/ruby/prism/pull/3606

[Bug #21187]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 0b0da6c4b26f80ad6985722d3fc0f5cdee09125d: [Backport #21648]</title>
<updated>2025-12-08T23:03:34+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-12-08T23:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d0b778cd19fdda858121d8f2405da2768603c9b1'/>
<id>d0b778cd19fdda858121d8f2405da2768603c9b1</id>
<content type='text'>
	[PATCH] Correctly compile splats in for-loop index in prism

	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>
	[PATCH] Correctly compile splats in for-loop index in prism

	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>[Bug #21313] Handle `it` in rescue and ensure blocks.</title>
<updated>2025-09-16T20:36:08+00:00</updated>
<author>
<name>Nick Dower</name>
<email>nicholasdower@gmail.com</email>
</author>
<published>2025-05-16T03:18:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f6d845011cf8900c0e9c6fe5e4243a63a5ecae3'/>
<id>1f6d845011cf8900c0e9c6fe5e4243a63a5ecae3</id>
<content type='text'>
The following is crashing for me:

```shell
ruby --yjit --yjit-call-threshold=1 -e '1.tap { raise rescue p it }'

ruby: YJIT has panicked. More info to follow...
thread '&lt;unnamed&gt;' panicked at ./yjit/src/codegen.rs:2402:14:
...
```

It seems `it` sometimes points to the wrong value:

```shell
ruby -e '1.tap { raise rescue p it }'
false

ruby -e '1.tap { begin; raise; ensure; p it; end } rescue nil'
false
```

But only when `$!` is set:

```shell
ruby -e '1.tap { begin; nil; ensure; p it; end }'
1

ruby -e '1.tap { begin; nil; rescue; ensure; p it; end }'
1

ruby -e '1.tap { begin; raise; rescue; ensure; p it; end }'
1
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following is crashing for me:

```shell
ruby --yjit --yjit-call-threshold=1 -e '1.tap { raise rescue p it }'

ruby: YJIT has panicked. More info to follow...
thread '&lt;unnamed&gt;' panicked at ./yjit/src/codegen.rs:2402:14:
...
```

It seems `it` sometimes points to the wrong value:

```shell
ruby -e '1.tap { raise rescue p it }'
false

ruby -e '1.tap { begin; raise; ensure; p it; end } rescue nil'
false
```

But only when `$!` is set:

```shell
ruby -e '1.tap { begin; nil; ensure; p it; end }'
1

ruby -e '1.tap { begin; nil; rescue; ensure; p it; end }'
1

ruby -e '1.tap { begin; raise; rescue; ensure; p it; end }'
1
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Explicitly use a ruby version for prism to parse the code as</title>
<updated>2025-09-12T21:30:16+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-09-12T20:49:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c63d6bee7b1bba0308e72cb8d54538ff84af612a'/>
<id>c63d6bee7b1bba0308e72cb8d54538ff84af612a</id>
<content type='text'>
Prism can parse multiple versions of ruby. Because of that branch release managers are ok with simply
bumping prism to its latest version.

However, if no version is specified, it will parse as the latest known version, which can be ahead of the maintenance branch.
So we need to explicitly pass a version to not accidentally introduce new syntax to maintenance branches.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prism can parse multiple versions of ruby. Because of that branch release managers are ok with simply
bumping prism to its latest version.

However, if no version is specified, it will parse as the latest known version, which can be ahead of the maintenance branch.
So we need to explicitly pass a version to not accidentally introduce new syntax to maintenance branches.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a missing write barrier to mandatory_only_iseq</title>
<updated>2025-09-05T16:05:06+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-06-08T01:37:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d2caeb1e70ea65a909bf2722706b2fd558982cc6'/>
<id>d2caeb1e70ea65a909bf2722706b2fd558982cc6</id>
<content type='text'>
Found by wbcheck
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found by wbcheck
</pre>
</div>
</content>
</entry>
<entry>
<title>When reading from stdin, put a wrapper around the IO object</title>
<updated>2025-08-27T16:07:32+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2025-07-17T22:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f421d092bb8c290df5cfc9e95a01e279ebadc42'/>
<id>1f421d092bb8c290df5cfc9e95a01e279ebadc42</id>
<content type='text'>
The purpose of this commit is to fix Bug #21188.  We need to detect when
stdin has run in to an EOF case.  Unfortunately we can't _call_ the eof
function on IO because it will block.

Here is a short script to demonstrate the issue:

```ruby
x = STDIN.gets
puts x
puts x.eof?
```

If you run the script, then type some characters (but _NOT_ a newline),
then hit Ctrl-D twice, it will print the input string.  Unfortunately,
calling `eof?` will try to read from STDIN again causing us to need a
3rd Ctrl-D to exit the program.

Before introducing the EOF callback to Prism, the input loop looked
kind of like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if str.nil?
    p :DONE
  end
end
```

Which required 3 Ctrl-D to exit.  If we naively changed it to something
like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if STDIN.eof?
    p :DONE
  end
end
```

It would still require 3 Ctrl-D because `eof?` would block.  In this
patch, we're wrapping the IO object, checking the buffer for a newline
and length, and then using that to simulate a non-blocking eof? method.

This commit wraps STDIN and emulates a non-blocking `eof` function.

[Backport #21188]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The purpose of this commit is to fix Bug #21188.  We need to detect when
stdin has run in to an EOF case.  Unfortunately we can't _call_ the eof
function on IO because it will block.

Here is a short script to demonstrate the issue:

```ruby
x = STDIN.gets
puts x
puts x.eof?
```

If you run the script, then type some characters (but _NOT_ a newline),
then hit Ctrl-D twice, it will print the input string.  Unfortunately,
calling `eof?` will try to read from STDIN again causing us to need a
3rd Ctrl-D to exit the program.

Before introducing the EOF callback to Prism, the input loop looked
kind of like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if str.nil?
    p :DONE
  end
end
```

Which required 3 Ctrl-D to exit.  If we naively changed it to something
like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if STDIN.eof?
    p :DONE
  end
end
```

It would still require 3 Ctrl-D because `eof?` would block.  In this
patch, we're wrapping the IO object, checking the buffer for a newline
and length, and then using that to simulate a non-blocking eof? method.

This commit wraps STDIN and emulates a non-blocking `eof` function.

[Backport #21188]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 148db9c80f11af1780f0f3685201f28de8f6b47a: [Backport #21259]</title>
<updated>2025-07-21T21:45:15+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-21T21:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8b505a286080fead52a603fcd2761c2d6b3e3aec'/>
<id>8b505a286080fead52a603fcd2761c2d6b3e3aec</id>
<content type='text'>
	Fix flipflop line numbers

	[ruby-core:121605]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix flipflop line numbers

	[ruby-core:121605]
</pre>
</div>
</content>
</entry>
</feed>
