<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/prism/fixtures, 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>[ruby/prism] Fix in handling</title>
<updated>2026-03-06T17:02:23+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2026-03-02T16:49:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b5a768b666f61a861449d9ee287cb0a3e05bbea8'/>
<id>b5a768b666f61a861449d9ee287cb0a3e05bbea8</id>
<content type='text'>
in is a unique keyword because it can be the start of a clause or
an infix keyword. We need to be explicitly sure that even though in
_could_ close an expression context (the body of another in clause)
that we are not also parsing an inline in. The exception is the
case of a command call, which can never be the LHS of an expression,
and so we must immediately exit.

[Bug #21925]
[Bug #21674]

https://github.com/ruby/prism/commit/20374ced51
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in is a unique keyword because it can be the start of a clause or
an infix keyword. We need to be explicitly sure that even though in
_could_ close an expression context (the body of another in clause)
that we are not also parsing an inline in. The exception is the
case of a command call, which can never be the LHS of an expression,
and so we must immediately exit.

[Bug #21925]
[Bug #21674]

https://github.com/ruby/prism/commit/20374ced51
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Correctly handle `and?` and similar on ruby 4.0</title>
<updated>2026-03-06T17:02:23+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2026-03-05T19:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=83c261f30bd43dc3465c0026b96e79af585fdfab'/>
<id>83c261f30bd43dc3465c0026b96e79af585fdfab</id>
<content type='text'>
It gets confused for syntax introduced in https://bugs.ruby-lang.org/issues/20925
But it actually should be a plain method call.
`!`/`?` are not valid as part of an identifier, methods
however allow them as the last character.

Fixes [Bug #21946]

https://github.com/ruby/prism/commit/5d80bc5e1a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It gets confused for syntax introduced in https://bugs.ruby-lang.org/issues/20925
But it actually should be a plain method call.
`!`/`?` are not valid as part of an identifier, methods
however allow them as the last character.

Fixes [Bug #21946]

https://github.com/ruby/prism/commit/5d80bc5e1a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Reject `p(p a, &amp;block =&gt; value)` and similar</title>
<updated>2025-12-19T00:58:53+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-12-01T20:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e2c886dd669dd640dae75e3ac6d7206b74870d1b'/>
<id>e2c886dd669dd640dae75e3ac6d7206b74870d1b</id>
<content type='text'>
Redo of https://github.com/ruby/prism/pull/3669 with more tests

https://github.com/ruby/prism/commit/48b403ea79
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Redo of https://github.com/ruby/prism/pull/3669 with more tests

https://github.com/ruby/prism/commit/48b403ea79
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix `%Q` with newline delimiter and heredoc interpolation</title>
<updated>2025-12-04T14:50:46+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-12-04T10:58:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=465a86c3417d2936c311d9571aa9b6494a83eed8'/>
<id>465a86c3417d2936c311d9571aa9b6494a83eed8</id>
<content type='text'>
The lexer did not jump to the `heredoc_end`, causing the heredoc end delimiter
to be parsed twice.

Normally the heredocs get flushed when a newline is encountered. But because
the newline is part of the string delimiter, that codepath is not taken.

Fixes [Bug #21758]

https://github.com/ruby/prism/commit/7440eb4b11
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The lexer did not jump to the `heredoc_end`, causing the heredoc end delimiter
to be parsed twice.

Normally the heredocs get flushed when a newline is encountered. But because
the newline is part of the string delimiter, that codepath is not taken.

Fixes [Bug #21758]

https://github.com/ruby/prism/commit/7440eb4b11
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Revert "Reject `p(p a, &amp;block =&gt; value)` and similar"</title>
<updated>2025-11-23T21:36:19+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-11-23T21:35:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b75cf83a333ab4e321e89cdefb94e684f6648033'/>
<id>b75cf83a333ab4e321e89cdefb94e684f6648033</id>
<content type='text'>
https://github.com/ruby/prism/commit/fef2c20777
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/fef2c20777
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Reject `p(p a, &amp;block =&gt; value)` and similar</title>
<updated>2025-11-23T18:15:15+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-11-18T08:33:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2870b7d7df30bc227f40a4c04c97050b90f1f25b'/>
<id>2870b7d7df30bc227f40a4c04c97050b90f1f25b</id>
<content type='text'>
They were being parsed as `p((p a, &amp;block) =&gt; value)`.
When we get to this point, we must not just have parsed a command call, always consuming the `=&gt;` is not correct.

Closes [Bug #21622]

https://github.com/ruby/prism/commit/796ab0edf4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They were being parsed as `p((p a, &amp;block) =&gt; value)`.
When we get to this point, we must not just have parsed a command call, always consuming the `=&gt;` is not correct.

Closes [Bug #21622]

https://github.com/ruby/prism/commit/796ab0edf4
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Reject endless method as a block parameter default</title>
<updated>2025-11-14T16:27:38+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-11-03T11:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bec69617a00e1d98748b319411f221568a4b6c66'/>
<id>bec69617a00e1d98748b319411f221568a4b6c66</id>
<content type='text'>
Fixes [Bug #21661]

https://github.com/ruby/prism/commit/475fa46a82
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21661]

https://github.com/ruby/prism/commit/475fa46a82
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Rename Ruby 3.5 to Ruby 4.0</title>
<updated>2025-11-08T00:22:17+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-11-07T12:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7037d8f89e71a13547d031d76747e45cfe930c9f'/>
<id>7037d8f89e71a13547d031d76747e45cfe930c9f</id>
<content type='text'>
See https://github.com/ruby/ruby/commit/6d81969b475262aba251e99b518181bdf7c5a523

It leaves the old variant around. RuboCop for examples accesses `Prism::Translation::Parser35`
to test against ruby-head. For now I left these simply as an alias

https://github.com/ruby/prism/commit/d0a823f045
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/ruby/ruby/commit/6d81969b475262aba251e99b518181bdf7c5a523

It leaves the old variant around. RuboCop for examples accesses `Prism::Translation::Parser35`
to test against ruby-head. For now I left these simply as an alias

https://github.com/ruby/prism/commit/d0a823f045
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Unescape unary method calls</title>
<updated>2025-10-30T13:05:51+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-10-27T10:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=99382f7461db80497b69df84ac52fab6710ba160'/>
<id>99382f7461db80497b69df84ac52fab6710ba160</id>
<content type='text'>
Followup to https://github.com/ruby/prism/pull/2213

Before:
```sh
$ ruby -ve "puts 42.~@"
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/prism/commit/dbd83256b1) +PRISM [x86_64-linux]
-e:1:in '&lt;main&gt;': undefined method '~@' for an instance of Integer (NoMethodError)
Did you mean?  ~
```

After (matches parse.y):
```sh
$ ./miniruby -ve "puts 42.~@"
ruby 3.5.0dev (2025-10-16T03:40:45Z master https://github.com/ruby/prism/commit/1d95d75c3f) +PRISM [x86_64-linux]
-43
```

https://github.com/ruby/prism/commit/a755bf228f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup to https://github.com/ruby/prism/pull/2213

Before:
```sh
$ ruby -ve "puts 42.~@"
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/prism/commit/dbd83256b1) +PRISM [x86_64-linux]
-e:1:in '&lt;main&gt;': undefined method '~@' for an instance of Integer (NoMethodError)
Did you mean?  ~
```

After (matches parse.y):
```sh
$ ./miniruby -ve "puts 42.~@"
ruby 3.5.0dev (2025-10-16T03:40:45Z master https://github.com/ruby/prism/commit/1d95d75c3f) +PRISM [x86_64-linux]
-43
```

https://github.com/ruby/prism/commit/a755bf228f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Make error and snapshot tests multi-version aware</title>
<updated>2025-10-22T14:50:11+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-10-17T14:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6047eada20d39bbe80976c31277ec7916118f78a'/>
<id>6047eada20d39bbe80976c31277ec7916118f78a</id>
<content type='text'>
This one has been on my mind for a while now.

Currently, there are only tests against the latest syntax version.

This changes the snapshot structure as follows:
* Snapshots at their current location are tested against all syntax versions
* Snapshots inside a version folder like "3.3" are tested against all versions starting from that version
* Snapshots inside a version folder like "3.3-4.2" are tested against all versions in the given range.

This makes sure that as new syntax is added, older versions still work as expected.
I also added a few tests for now valid syntax that should be invalid in older versions (and the other way around as well)

These tests run really fast. So even though it does 3x the work for these, I am still able to run the whole test suite in just 11 seconds.

https://github.com/ruby/prism/commit/5191b1aa68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This one has been on my mind for a while now.

Currently, there are only tests against the latest syntax version.

This changes the snapshot structure as follows:
* Snapshots at their current location are tested against all syntax versions
* Snapshots inside a version folder like "3.3" are tested against all versions starting from that version
* Snapshots inside a version folder like "3.3-4.2" are tested against all versions in the given range.

This makes sure that as new syntax is added, older versions still work as expected.
I also added a few tests for now valid syntax that should be invalid in older versions (and the other way around as well)

These tests run really fast. So even though it does 3x the work for these, I am still able to run the whole test suite in just 11 seconds.

https://github.com/ruby/prism/commit/5191b1aa68
</pre>
</div>
</content>
</entry>
</feed>
