<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/prism/ruby/ruby_parser_test.rb, branch v4.0.3</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 `%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] 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>
<entry>
<title>[ruby/prism] Reject argument command call taking a block with more trailing arguments</title>
<updated>2025-09-19T16:55:01+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-09-17T17:06:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=71067aa54c9fd819313dd2d35cb5b32803a65ad4'/>
<id>71067aa54c9fd819313dd2d35cb5b32803a65ad4</id>
<content type='text'>
https://bugs.ruby-lang.org/issues/21168#note-5

The added code samples align with `parse.y`, except for `foo(bar baz do end)` which `parse.y` currently rejects but shouldn't.

https://github.com/ruby/prism/commit/3a4e102d80
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugs.ruby-lang.org/issues/21168#note-5

The added code samples align with `parse.y`, except for `foo(bar baz do end)` which `parse.y` currently rejects but shouldn't.

https://github.com/ruby/prism/commit/3a4e102d80
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix character literal forced encoding</title>
<updated>2025-09-15T15:10:34+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-09-15T14:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6c34880111a0978407224fc353c35f2a3a0a981a'/>
<id>6c34880111a0978407224fc353c35f2a3a0a981a</id>
<content type='text'>
If a character literal was followed by a string concatenation, then
the forced encoding of the string concatenation could accidentally
overwrite the explicit encoding of the character literal. We now
handle this properly.

https://github.com/ruby/prism/commit/125c375d74
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a character literal was followed by a string concatenation, then
the forced encoding of the string concatenation could accidentally
overwrite the explicit encoding of the character literal. We now
handle this properly.

https://github.com/ruby/prism/commit/125c375d74
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] [Bug #17398] Allow `private def hello = puts "Hello"`</title>
<updated>2025-09-12T19:00:01+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-09-02T11:29:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f2dbc4ec82a0e103ac1e3f64f5983540cdc75fd3'/>
<id>f2dbc4ec82a0e103ac1e3f64f5983540cdc75fd3</id>
<content type='text'>
This was a limitation of parse.y that prism intentionally replicated.

https://github.com/ruby/prism/commit/8fd12d594c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was a limitation of parse.y that prism intentionally replicated.

https://github.com/ruby/prism/commit/8fd12d594c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Support leading logical operators</title>
<updated>2025-09-12T17:51:39+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-12-21T20:36:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2c9afcc3896c9c18f6ea8278f479a379401551a1'/>
<id>2c9afcc3896c9c18f6ea8278f479a379401551a1</id>
<content type='text'>
https://github.com/ruby/prism/commit/3f58fa7705
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/3f58fa7705
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Avoid monkey patching Sexp#== in RubyParser tests</title>
<updated>2025-08-01T16:57:18+00:00</updated>
<author>
<name>Justin Collins</name>
<email>justin@presidentbeef.com</email>
</author>
<published>2025-08-01T01:15:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c6dd3cefa17ed6878f1faee2761c77456efed685'/>
<id>c6dd3cefa17ed6878f1faee2761c77456efed685</id>
<content type='text'>
https://github.com/ruby/prism/commit/7362b114a3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/7362b114a3
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parser translator multiline interpolated symbols</title>
<updated>2025-03-18T17:36:53+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-01-19T14:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=94e12ffa39e46f5b1f80485e9b2e06a59cd69dac'/>
<id>94e12ffa39e46f5b1f80485e9b2e06a59cd69dac</id>
<content type='text'>
In https://github.com/ruby/prism/commit/26370079291a420c6b2b7be5cdbd5c609da62f21 I added tests but didn't modify them correctly

https://github.com/ruby/prism/commit/de021e74de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In https://github.com/ruby/prism/commit/26370079291a420c6b2b7be5cdbd5c609da62f21 I added tests but didn't modify them correctly

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