<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism/encoding.c, 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] Avoid out-of-bounds reads</title>
<updated>2025-12-05T20:20:18+00:00</updated>
<author>
<name>Steven Johnstone</name>
<email>steven.james.johnstone@gmail.com</email>
</author>
<published>2025-12-05T16:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=834adc358ae967dfa52890a9abba551a070ab75e'/>
<id>834adc358ae967dfa52890a9abba551a070ab75e</id>
<content type='text'>
Fixes https://github.com/ruby/prism/pull/3784.

https://github.com/ruby/prism/commit/3fe862534b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/ruby/prism/pull/3784.

https://github.com/ruby/prism/commit/3fe862534b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Update unicode tables to match that of CRuby</title>
<updated>2025-11-30T04:24:06+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-11-29T20:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3bd9583a52e9c3f55adb2097a84c4adb09cf74a3'/>
<id>3bd9583a52e9c3f55adb2097a84c4adb09cf74a3</id>
<content type='text'>
The unicode version has been updated upstream, which means new
codepoints mapped to alpha/alnum/isupper flags. We need to update
our tables to match.

I'm purposefully not adding a version check here, since that is
such a large amount of code. It's possible that we could include
different tables depending on a macro (like UNICODE_VERSION) or
something to that effect, but it's such a minimal impact on the
running of the actual parser that I don't think it's necessary.

https://github.com/ruby/prism/commit/78925fe5b6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The unicode version has been updated upstream, which means new
codepoints mapped to alpha/alnum/isupper flags. We need to update
our tables to match.

I'm purposefully not adding a version check here, since that is
such a large amount of code. It's possible that we could include
different tables depending on a macro (like UNICODE_VERSION) or
something to that effect, but it's such a minimal impact on the
running of the actual parser that I don't think it's necessary.

https://github.com/ruby/prism/commit/78925fe5b6
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Provide options for reducing size</title>
<updated>2024-03-20T21:32:03+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-03-20T14:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af7bf9e0d8fd5e542781ca7ac9550e3011913924'/>
<id>af7bf9e0d8fd5e542781ca7ac9550e3011913924</id>
<content type='text'>
https://github.com/ruby/prism/commit/592128de4d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/592128de4d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Triple-check prism encodings</title>
<updated>2024-02-26T18:29:00+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-02-26T17:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=34bad6d69f7a7fa10a4e5aa48a6895afc9aebf1e'/>
<id>34bad6d69f7a7fa10a4e5aa48a6895afc9aebf1e</id>
<content type='text'>
https://github.com/ruby/prism/commit/ab7f261354
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/ab7f261354
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Validate multibyte characters in strings</title>
<updated>2024-02-14T01:01:37+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-02-13T22:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2fa051f627172674b342da26ebe1e671a5e449ec'/>
<id>2fa051f627172674b342da26ebe1e671a5e449ec</id>
<content type='text'>
Check that multibyte characters are valid using pm_strpbrk. We need
to add a couple of codepaths to ensure all encodings are covered.

Importantly this doesn't check regular expressions, because
apparently you're allowed to have invalid multibyte characters
inside regular expression comment groups/extended mode.

https://github.com/ruby/prism/commit/2857d3e1b5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check that multibyte characters are valid using pm_strpbrk. We need
to add a couple of codepaths to ensure all encodings are covered.

Importantly this doesn't check regular expressions, because
apparently you're allowed to have invalid multibyte characters
inside regular expression comment groups/extended mode.

https://github.com/ruby/prism/commit/2857d3e1b5
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix KOI-8 char width check</title>
<updated>2024-02-13T21:12:10+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-02-13T21:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dc5191d6952246be6717a76c193abe1bc55128b7'/>
<id>dc5191d6952246be6717a76c193abe1bc55128b7</id>
<content type='text'>
https://github.com/ruby/prism/commit/06d3747c5b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/06d3747c5b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Amend assert in pm_utf_8_codepoint(), n=0 is fine</title>
<updated>2024-02-01T22:04:46+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-02-01T20:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=770b5499a550956001b879abb5bbd205eabda19f'/>
<id>770b5499a550956001b879abb5bbd205eabda19f</id>
<content type='text'>
This assert used to trip in the included test:
```
./miniruby --parser=prism -e ' "%W"\u" '
```

https://github.com/ruby/prism/commit/8c0f84db4f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This assert used to trip in the included test:
```
./miniruby --parser=prism -e ' "%W"\u" '
```

https://github.com/ruby/prism/commit/8c0f84db4f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Always return the character width for char_is_identifier_start() and char_is_identifier_utf8()</title>
<updated>2024-01-31T21:29:16+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2024-01-31T21:19:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9fdfdf4fca22e892e92ad7060abac48a00516d81'/>
<id>9fdfdf4fca22e892e92ad7060abac48a00516d81</id>
<content type='text'>
* This is also faster than calling pm_encoding_utf_8_alpha_char/pm_encoding_utf_8_alnum_char
  as those compute the character width and do extra checks.

https://github.com/ruby/prism/commit/4cb276ac4c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is also faster than calling pm_encoding_utf_8_alpha_char/pm_encoding_utf_8_alnum_char
  as those compute the character width and do extra checks.

https://github.com/ruby/prism/commit/4cb276ac4c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Exclude encodings that are dynamic</title>
<updated>2024-01-11T19:14:25+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-01-11T19:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=242dc537f93a0e11d91e729823cf8df2caec6abd'/>
<id>242dc537f93a0e11d91e729823cf8df2caec6abd</id>
<content type='text'>
https://github.com/ruby/prism/commit/6749146c0e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/6749146c0e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Update documentation for encodings</title>
<updated>2023-12-06T19:26:35+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-12-06T19:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=82072254a05c88648caac2bd51069681e37f91aa'/>
<id>82072254a05c88648caac2bd51069681e37f91aa</id>
<content type='text'>
https://github.com/ruby/prism/commit/18e6df0d4f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/18e6df0d4f
</pre>
</div>
</content>
</entry>
</feed>
