<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/prism/errors/regexp_unicode_too_short.txt, 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] Pass Unicode escapes on to onigmo</title>
<updated>2024-08-23T19:18:14+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-08-23T19:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3eb42054d9f50a0a65d014bb9e55349938deb97b'/>
<id>3eb42054d9f50a0a65d014bb9e55349938deb97b</id>
<content type='text'>
When we encounter an invalid unicode escape within a regular
expression, we now pass that error on to Onigmo as if it didn't
exist in the parser (which matches the upstream parser's behavior).

We do this because there are tests that specify that you are
allowed to have invalid Unicode escapes if they are within the
context of a regular expression comment for a regular expression
in extended mode. That looks like:

    /# \u /x

Note that this _only_ applies to Unicode escapes (as opposed to
applying to hex or meta/control escapes as well). Importantly it
also only applies if the regular expression is terminated. An
unterminated regular expression will still get error handling done
in the parser. That would look like:

    /# \u

that would result in the same error handling we have today.

https://github.com/ruby/prism/commit/fb98034806
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we encounter an invalid unicode escape within a regular
expression, we now pass that error on to Onigmo as if it didn't
exist in the parser (which matches the upstream parser's behavior).

We do this because there are tests that specify that you are
allowed to have invalid Unicode escapes if they are within the
context of a regular expression comment for a regular expression
in extended mode. That looks like:

    /# \u /x

Note that this _only_ applies to Unicode escapes (as opposed to
applying to hex or meta/control escapes as well). Importantly it
also only applies if the regular expression is terminated. An
unterminated regular expression will still get error handling done
in the parser. That would look like:

    /# \u

that would result in the same error handling we have today.

https://github.com/ruby/prism/commit/fb98034806
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Special error for too short unicode errors</title>
<updated>2024-08-15T16:40:05+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-08-15T16:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cbf508da58d50f7448f10a1a6030b3a48dfec14d'/>
<id>cbf508da58d50f7448f10a1a6030b3a48dfec14d</id>
<content type='text'>
https://github.com/ruby/prism/commit/9f1f7d08bd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/9f1f7d08bd
</pre>
</div>
</content>
</entry>
</feed>
