<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/prism/fixtures/strings.txt, branch v4.0.4</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 parser translator with trailing backslash in `%W` /`%I` array</title>
<updated>2025-06-30T12:32:31+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-06-12T12:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3071c5d04cb4369ee8118ece30fb2887205f6c61'/>
<id>3071c5d04cb4369ee8118ece30fb2887205f6c61</id>
<content type='text'>
https://docs.ruby-lang.org/en/master/syntax/literals_rdoc.html#label-25w+and+-25W-3A+String-Array+Literals
&gt; %W allow escape sequences described in Escape Sequences. However the continuation line &lt;newline&gt; is not usable because it is interpreted as the escaped newline described above.

https://github.com/ruby/prism/commit/f5c7460ad5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://docs.ruby-lang.org/en/master/syntax/literals_rdoc.html#label-25w+and+-25W-3A+String-Array+Literals
&gt; %W allow escape sequences described in Escape Sequences. However the continuation line &lt;newline&gt; is not usable because it is interpreted as the escaped newline described above.

https://github.com/ruby/prism/commit/f5c7460ad5
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parser translator during string escaping with invalid utf-8</title>
<updated>2025-06-11T18:07:43+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-06-11T13:28:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=970813d98285b8f59fe5e4d3c815cc044926cb1b'/>
<id>970813d98285b8f59fe5e4d3c815cc044926cb1b</id>
<content type='text'>
Instead, prefer `scan_byte` over `get_byte` since that already returns the byte as an integer, sidestepping conversion issues.

Fixes https://github.com/ruby/prism/issues/3582

https://github.com/ruby/prism/commit/7f3008b2b5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead, prefer `scan_byte` over `get_byte` since that already returns the byte as an integer, sidestepping conversion issues.

Fixes https://github.com/ruby/prism/issues/3582

https://github.com/ruby/prism/commit/7f3008b2b5
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add a multiple statements flag to parentheses</title>
<updated>2025-03-18T17:36:53+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-03-13T17:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dc48c1aca347f43ef9cb122342c80d699c5860fa'/>
<id>dc48c1aca347f43ef9cb122342c80d699c5860fa</id>
<content type='text'>
This can get triggered even if the list of statements only contains
a single statement. This is necessary to properly support compiling

```ruby
defined? (;a)
defined? (a;)
```

as "expression". Previously these were parsed as statements lists
with single statements in them.

https://github.com/ruby/prism/commit/b63b5d67a9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can get triggered even if the list of statements only contains
a single statement. This is necessary to properly support compiling

```ruby
defined? (;a)
defined? (a;)
```

as "expression". Previously these were parsed as statements lists
with single statements in them.

https://github.com/ruby/prism/commit/b63b5d67a9
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Further refine string handling in the parser translator</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-15T22:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a8adf5e006da03b8ccaa2bf900f4f077ca9888cf'/>
<id>a8adf5e006da03b8ccaa2bf900f4f077ca9888cf</id>
<content type='text'>
Mostly around newlines and line continuation.
* percent arrays need special backslash handling in the ast
* Fix offset issue for heredocs with many line continuations (used wrong variable as index access)
* More refined rules on when to simplify string tokens
* Handle line continuations in squiggly heredocs
* Correctly dedent squiggly heredocs with interpolation
* Consider `':foo:` and `%s[foo]` to not be interpolation

https://github.com/ruby/prism/commit/4edfe9d981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly around newlines and line continuation.
* percent arrays need special backslash handling in the ast
* Fix offset issue for heredocs with many line continuations (used wrong variable as index access)
* More refined rules on when to simplify string tokens
* Handle line continuations in squiggly heredocs
* Correctly dedent squiggly heredocs with interpolation
* Consider `':foo:` and `%s[foo]` to not be interpolation

https://github.com/ruby/prism/commit/4edfe9d981
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Further refine string handling in the parser translator</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-15T22:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fd7a10cf4a73f27a0113a6bc2a65c4c274ee11ec'/>
<id>fd7a10cf4a73f27a0113a6bc2a65c4c274ee11ec</id>
<content type='text'>
Mostly around newlines and line continuation.
* percent arrays need special backslash handling in the ast
* Fix offset issue for heredocs with many line continuations (used wrong variable as index access)
* More refined rules on when to simplify string tokens
* Handle line continuations in squiggly heredocs
* Correctly dedent squiggly heredocs with interpolation
* Consider `':foo:` and `%s[foo]` to not be interpolation

https://github.com/ruby/prism/commit/4edfe9d981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly around newlines and line continuation.
* percent arrays need special backslash handling in the ast
* Fix offset issue for heredocs with many line continuations (used wrong variable as index access)
* More refined rules on when to simplify string tokens
* Handle line continuations in squiggly heredocs
* Correctly dedent squiggly heredocs with interpolation
* Consider `':foo:` and `%s[foo]` to not be interpolation

https://github.com/ruby/prism/commit/4edfe9d981
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parser translator tokens for %-arrays with whitespace escapes</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-13T20:17:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=177adf6fa543663334bfb8918b356b4771e5ff1a'/>
<id>177adf6fa543663334bfb8918b356b4771e5ff1a</id>
<content type='text'>
Also fixes a token incompatibility for the word separator. parser only considers whitespace until the first newline

https://github.com/ruby/prism/commit/bd3dd2b62a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fixes a token incompatibility for the word separator. parser only considers whitespace until the first newline

https://github.com/ruby/prism/commit/bd3dd2b62a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parser translator edge-case when multiline string ends with \n</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-20T14:49:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac728389e219480dd678a01e6f91f96098d3b6d6'/>
<id>ac728389e219480dd678a01e6f91f96098d3b6d6</id>
<content type='text'>
When the line contains no real newline but contains unescaped ones, then there will be one less entry

https://github.com/ruby/prism/commit/4ef093b600
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the line contains no real newline but contains unescaped ones, then there will be one less entry

https://github.com/ruby/prism/commit/4ef093b600
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Better handle all kinds of multiline strings in the parser translator</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-08T20:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0fcb7fc21d1923a61ffe4d127e6e72cc55560972'/>
<id>0fcb7fc21d1923a61ffe4d127e6e72cc55560972</id>
<content type='text'>
This is a followup to #3373, where the implementation
was extracted

https://github.com/ruby/prism/commit/2637007929
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to #3373, where the implementation
was extracted

https://github.com/ruby/prism/commit/2637007929
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Further refine string handling in the parser translator</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-15T22:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc506295a30a5806b3346ed09cd679f3b8ee6f64'/>
<id>bc506295a30a5806b3346ed09cd679f3b8ee6f64</id>
<content type='text'>
Mostly around newlines and line continuation.
* percent arrays need special backslash handling in the ast
* Fix offset issue for heredocs with many line continuations (used wrong variable as index access)
* More refined rules on when to simplify string tokens
* Handle line continuations in squiggly heredocs
* Correctly dedent squiggly heredocs with interpolation
* Consider `':foo:` and `%s[foo]` to not be interpolation

https://github.com/ruby/prism/commit/4edfe9d981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly around newlines and line continuation.
* percent arrays need special backslash handling in the ast
* Fix offset issue for heredocs with many line continuations (used wrong variable as index access)
* More refined rules on when to simplify string tokens
* Handle line continuations in squiggly heredocs
* Correctly dedent squiggly heredocs with interpolation
* Consider `':foo:` and `%s[foo]` to not be interpolation

https://github.com/ruby/prism/commit/4edfe9d981
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parser translator when unescaping invalid utf8</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-12T19:08:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=705bd6fadbd5a784d2c0fd52138007404de6a5c2'/>
<id>705bd6fadbd5a784d2c0fd52138007404de6a5c2</id>
<content type='text'>
1. The string starts out as binary
2. `ち` is appended, forcing it back into utf-8
3. Some invalid byte sequences are tried to append

&gt; incompatible character encodings: UTF-8 and BINARY (ASCII-8BIT)

This makes use of my wish to use `append_as_bytes`. Unfortunatly that method is rather new
so it needs a fallback

https://github.com/ruby/prism/commit/e31e94a775
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. The string starts out as binary
2. `ち` is appended, forcing it back into utf-8
3. Some invalid byte sequences are tried to append

&gt; incompatible character encodings: UTF-8 and BINARY (ASCII-8BIT)

This makes use of my wish to use `append_as_bytes`. Unfortunatly that method is rather new
so it needs a fallback

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