<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/rubygems/package, 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>Reapply "[ruby/rubygems] Fix constants in TAR to be frozen"</title>
<updated>2025-11-12T09:35:16+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-11-04T02:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f958800574c42e69844db7305e69d1f494529543'/>
<id>f958800574c42e69844db7305e69d1f494529543</id>
<content type='text'>
This reverts commit 136157e772ab2b2ea08555d0ad821da7dc2bde96.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 136157e772ab2b2ea08555d0ad821da7dc2bde96.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[ruby/rubygems] Fix constants in TAR to be frozen"</title>
<updated>2025-11-04T01:02:09+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-11-04T01:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=136157e772ab2b2ea08555d0ad821da7dc2bde96'/>
<id>136157e772ab2b2ea08555d0ad821da7dc2bde96</id>
<content type='text'>
This reverts commit 2c2eaa3103e5cf1cbfc2b16d9db975a9b8a0399a.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2c2eaa3103e5cf1cbfc2b16d9db975a9b8a0399a.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rubygems] Fix constants in TAR to be frozen</title>
<updated>2025-11-04T00:22:33+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2025-10-31T21:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2c2eaa3103e5cf1cbfc2b16d9db975a9b8a0399a'/>
<id>2c2eaa3103e5cf1cbfc2b16d9db975a9b8a0399a</id>
<content type='text'>
I would like to use the tar implementation inside a Ractor, but two of
the constants are not frozen.  This patch freezes the constants so we
can use it in a Ractor.

https://github.com/ruby/rubygems/commit/0ff4790f4c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I would like to use the tar implementation inside a Ractor, but two of
the constants are not frozen.  This patch freezes the constants so we
can use it in a Ractor.

https://github.com/ruby/rubygems/commit/0ff4790f4c
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use `IO.copy_stream` with IO object directly</title>
<updated>2025-09-16T08:17:32+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2025-09-12T22:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=12aa9e7457458245c9452ca5f786f6191742edf2'/>
<id>12aa9e7457458245c9452ca5f786f6191742edf2</id>
<content type='text'>
Before this patch we would use `IO.copy_stream` with the tar entry
object rather than just straight to the IO.  That means every time
copy_stream wanted data, we would have to proxy the call.

The reason we did this is because every tar entry object _shares_ the
same IO object, and previous to https://github.com/rubygems/rubygems/commit/8927533b0a47
we would call `IO.copy_stream` _without_ a size.  Without passing a
size, copy_stream will just read until there is nothing left to read, so
these proxy object emulate finding "the end of the file" (where "end of
file" means "end of tar chunk").  Without emulating this "end of file"
behavior, copy_stream would just keep reading past the end of the tar
chunk.

However, now that we're passing the size to copy_stream, we can bypass
the proxy object overhead and just use the IO object directly because
copy_stream knows exactly the number of bytes it needs to read and will
stop when it reaches the goal.

https://github.com/rubygems/rubygems/commit/857002c135
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this patch we would use `IO.copy_stream` with the tar entry
object rather than just straight to the IO.  That means every time
copy_stream wanted data, we would have to proxy the call.

The reason we did this is because every tar entry object _shares_ the
same IO object, and previous to https://github.com/rubygems/rubygems/commit/8927533b0a47
we would call `IO.copy_stream` _without_ a size.  Without passing a
size, copy_stream will just read until there is nothing left to read, so
these proxy object emulate finding "the end of the file" (where "end of
file" means "end of tar chunk").  Without emulating this "end of file"
behavior, copy_stream would just keep reading past the end of the tar
chunk.

However, now that we're passing the size to copy_stream, we can bypass
the proxy object overhead and just use the IO object directly because
copy_stream knows exactly the number of bytes it needs to read and will
stop when it reaches the goal.

https://github.com/rubygems/rubygems/commit/857002c135
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use spaces around optional parameter values</title>
<updated>2025-08-18T03:31:51+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-08-11T20:02:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7125f7635d43f67b1664bf85e72a34d868259822'/>
<id>7125f7635d43f67b1664bf85e72a34d868259822</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/b58829a868
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/b58829a868
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Add mtime to Gem::Package::TarWriter#add_file argument</title>
<updated>2025-05-08T09:03:04+00:00</updated>
<author>
<name>Yusuke Nakamura</name>
<email>yusuke1994525@gmail.com</email>
</author>
<published>2025-05-03T14:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=819ecd115d663e5d0c7e1f14902f5bfde0a7414a'/>
<id>819ecd115d663e5d0c7e1f14902f5bfde0a7414a</id>
<content type='text'>
Since 9e21dd9, Gem::Package::TarWriter#add_file adds the file to
the tar with Gem.source_date_epoch for its mtime.
This behavior breaks the code depending on the previous add_file
behavior.
Therefore, add_file accepts mtime as an argument, and uses
Gem.source_date_epoch if not specified.

https://github.com/rubygems/rubygems/commit/7020ea98a0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 9e21dd9, Gem::Package::TarWriter#add_file adds the file to
the tar with Gem.source_date_epoch for its mtime.
This behavior breaks the code depending on the previous add_file
behavior.
Therefore, add_file accepts mtime as an argument, and uses
Gem.source_date_epoch if not specified.

https://github.com/rubygems/rubygems/commit/7020ea98a0
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix incompatible encodings error</title>
<updated>2024-11-04T10:04:40+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2024-10-31T16:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=50dbe19b685047cff7000878b330eee8a3f2583d'/>
<id>50dbe19b685047cff7000878b330eee8a3f2583d</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/d478ec403f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/d478ec403f
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations</title>
<updated>2024-05-13T13:01:44+00:00</updated>
<author>
<name>Samuel Giddins</name>
<email>segiddins@segiddins.me</email>
</author>
<published>2024-02-20T19:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=02c8e6583b33c62b4050420234167a467f32fefa'/>
<id>02c8e6583b33c62b4050420234167a467f32fefa</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/716666f65f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/716666f65f
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fewer allocations in gem installation</title>
<updated>2023-12-11T23:14:58+00:00</updated>
<author>
<name>Samuel Giddins</name>
<email>segiddins@segiddins.me</email>
</author>
<published>2023-09-19T01:51:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=505715ddf17e004d184c0b71afb40a31e2e8c98e'/>
<id>505715ddf17e004d184c0b71afb40a31e2e8c98e</id>
<content type='text'>
For now, on a small rails app I have hanging around:

```
==&gt; memprof.after.txt &lt;==
Total allocated: 872.51 MB (465330 objects)
Total retained:  40.48 kB (326 objects)

==&gt; memprof.before.txt &lt;==
Total allocated: 890.79 MB (1494026 objects)
Total retained:  40.40 kB (328 objects)
```

Not a huge difference in memory usage, but it's a drastic improvement
in total number of allocations.

Additionally, this will pay huge dividends once
https://github.com/ruby/zlib/pull/61 is merged, as it will allow us to
completely avoid allocations in the repeated calls to readpartial,
which currently accounts for most of the memory usage shown above.

https://github.com/rubygems/rubygems/commit/f78d45d927
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For now, on a small rails app I have hanging around:

```
==&gt; memprof.after.txt &lt;==
Total allocated: 872.51 MB (465330 objects)
Total retained:  40.48 kB (326 objects)

==&gt; memprof.before.txt &lt;==
Total allocated: 890.79 MB (1494026 objects)
Total retained:  40.40 kB (328 objects)
```

Not a huge difference in memory usage, but it's a drastic improvement
in total number of allocations.

Additionally, this will pay huge dividends once
https://github.com/ruby/zlib/pull/61 is merged, as it will allow us to
completely avoid allocations in the repeated calls to readpartial,
which currently accounts for most of the memory usage shown above.

https://github.com/rubygems/rubygems/commit/f78d45d927
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use modern hashes consistently</title>
<updated>2023-12-07T22:29:33+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-12-07T21:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2755cb1b2fbc4a5f08ca56345b5945bd452da74e'/>
<id>2755cb1b2fbc4a5f08ca56345b5945bd452da74e</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/bb66253f2c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/bb66253f2c
</pre>
</div>
</content>
</entry>
</feed>
