<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism/util, 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] Correct constant pool bucket type logic</title>
<updated>2025-12-05T20:35:31+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-12-05T20:17:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=786f67393875b0a5089da73504ac57179e8ef829'/>
<id>786f67393875b0a5089da73504ac57179e8ef829</id>
<content type='text'>
When replacing an owned constant by a different type (constant or
shared) replace with the correct type instead of defaulting to
shared.

https://github.com/ruby/prism/commit/fbe9b131a1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When replacing an owned constant by a different type (constant or
shared) replace with the correct type instead of defaulting to
shared.

https://github.com/ruby/prism/commit/fbe9b131a1
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix dangling pointers on Windows as well</title>
<updated>2025-09-19T14:27:00+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-09-19T13:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b082d672533a6c0cf69c39497342cb2d5dde9f12'/>
<id>b082d672533a6c0cf69c39497342cb2d5dde9f12</id>
<content type='text'>
Share the empty source string in `pm_string_mapped_init` and
`pm_string_file_init`.

https://github.com/ruby/prism/commit/f7a9a03a92
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Share the empty source string in `pm_string_mapped_init` and
`pm_string_file_init`.

https://github.com/ruby/prism/commit/f7a9a03a92
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix dangling pointers</title>
<updated>2025-09-13T08:10:44+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-09-12T14:17:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=234f4c0bb62b394971eb1044c9c0b1f994d1d4c4'/>
<id>234f4c0bb62b394971eb1044c9c0b1f994d1d4c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add `\memberof` annotations</title>
<updated>2025-09-12T19:07:20+00:00</updated>
<author>
<name>Alexander Momchilov</name>
<email>alexander.momchilov@shopify.com</email>
</author>
<published>2024-08-30T20:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=869c63bcc3fb8d518fcc5eea30b57299eb07fd03'/>
<id>869c63bcc3fb8d518fcc5eea30b57299eb07fd03</id>
<content type='text'>
https://github.com/ruby/prism/commit/d1d2161219
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/d1d2161219
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add links to code refs in docs</title>
<updated>2025-09-12T18:40:43+00:00</updated>
<author>
<name>Alexander Momchilov</name>
<email>alexander.momchilov@shopify.com</email>
</author>
<published>2024-08-30T19:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=120d3b12a9981f547b07c937dd183c0abe77c6cb'/>
<id>120d3b12a9981f547b07c937dd183c0abe77c6cb</id>
<content type='text'>
https://github.com/ruby/prism/commit/d2d9a1f1a7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/d2d9a1f1a7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Use a locale-insensitive version of tolower</title>
<updated>2025-02-28T00:28:24+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-02-27T20:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=025832c3859c4369ed12ace13e35523bd04116fe'/>
<id>025832c3859c4369ed12ace13e35523bd04116fe</id>
<content type='text'>
[Bug #21161]

The `tolower` function provided by the libc is locale dependent
and can behave in ways you wouldn't expect for some value
of `LC_CTYPE`.

https://github.com/ruby/prism/commit/e3488256b4

Co-Authored-By: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21161]

The `tolower` function provided by the libc is locale dependent
and can behave in ways you wouldn't expect for some value
of `LC_CTYPE`.

https://github.com/ruby/prism/commit/e3488256b4

Co-Authored-By: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Handle zero-sized allocation in pm_constant_id_list_init_capacity</title>
<updated>2025-02-13T20:12:43+00:00</updated>
<author>
<name>HASUMI Hitoshi</name>
<email>hasumikin@gmail.com</email>
</author>
<published>2025-02-01T05:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=31162bf4261b2e740f6e26f2c2f22c36d3556cf0'/>
<id>31162bf4261b2e740f6e26f2c2f22c36d3556cf0</id>
<content type='text'>
According to the calloc(3) man page, when nmemb or size is 0, `calloc()` can either return NULL or a unique pointer that can be passed to `free()`.
While gcc and clang typically return a unique pointer, mruby's `mrb_calloc()` returns NULL in this case.

Since `pm_constant_pool_init()` is commonly called with capacity=0 during normal operation of Prism, explicitly handle this case by setting `list-&gt;ids` to NULL when capacity is 0.
This approach is portable across different calloc implementations and avoids potential issues with mruby's allocation behavior.

This maintains compatibility with `free()` and `realloc()`, as passing NULL pointers to these functions is explicitly allowed by their specifications.

https://github.com/ruby/prism/commit/1c32252df7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the calloc(3) man page, when nmemb or size is 0, `calloc()` can either return NULL or a unique pointer that can be passed to `free()`.
While gcc and clang typically return a unique pointer, mruby's `mrb_calloc()` returns NULL in this case.

Since `pm_constant_pool_init()` is commonly called with capacity=0 during normal operation of Prism, explicitly handle this case by setting `list-&gt;ids` to NULL when capacity is 0.
This approach is portable across different calloc implementations and avoids potential issues with mruby's allocation behavior.

This maintains compatibility with `free()` and `realloc()`, as passing NULL pointers to these functions is explicitly allowed by their specifications.

https://github.com/ruby/prism/commit/1c32252df7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Handle escapes in named capture names</title>
<updated>2025-01-08T20:36:06+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-01-08T03:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c4534c9fe88259de9509e4b75fb6afc31a1f00a7'/>
<id>c4534c9fe88259de9509e4b75fb6afc31a1f00a7</id>
<content type='text'>
https://github.com/ruby/prism/commit/b4b7a69ce7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/b4b7a69ce7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix a possible leak of a file descriptor</title>
<updated>2024-11-28T02:15:25+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-11-28T01:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=29e90a598a0c055c7d1a2d5e9fe279a6d30fae6a'/>
<id>29e90a598a0c055c7d1a2d5e9fe279a6d30fae6a</id>
<content type='text'>
When mmap fails for any reason, the fd must be closed.

Coverity Scan found this issue.

https://github.com/ruby/prism/commit/c06e9c400f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When mmap fails for any reason, the fd must be closed.

Coverity Scan found this issue.

https://github.com/ruby/prism/commit/c06e9c400f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Only read from buffer if `size` is greater than 0</title>
<updated>2024-10-28T20:38:20+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2024-10-28T20:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3c9be02af1e44a79191309cf727ede20cc576cb0'/>
<id>3c9be02af1e44a79191309cf727ede20cc576cb0</id>
<content type='text'>
It looks like we can possibly do an out of bounds read if size is equal
to 0.  This commit adds a conditional to ensure size is actually greater
than 0 before looking backwards in the buffer

https://github.com/ruby/prism/commit/2031b626e6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It looks like we can possibly do an out of bounds read if size is equal
to 0.  This commit adds a conditional to ensure size is actually greater
than 0 before looking backwards in the buffer

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