<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/test_bundled_gems.rb, 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>Use $LOAD_PATH.replace for safer restoration in test</title>
<updated>2026-03-12T00:42:58+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-03-11T10:25:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=efca0f45203d5908b3ec155b40e59baa8504f0ae'/>
<id>efca0f45203d5908b3ec155b40e59baa8504f0ae</id>
<content type='text'>
Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress bundled gems warning for subfeatures found outside stdlib [Bug #21828]</title>
<updated>2026-03-12T00:42:58+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-03-11T10:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9bcd9ba9b31fea19dc56bc2f5c69cf584d3bd23c'/>
<id>9bcd9ba9b31fea19dc56bc2f5c69cf584d3bd23c</id>
<content type='text'>
Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bundled gems warning for all subfeatures of hyphenated gems</title>
<updated>2026-02-12T18:41:49+00:00</updated>
<author>
<name>Chris Hasiński</name>
<email>krzysztof.hasinski@gmail.com</email>
</author>
<published>2026-01-19T17:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=485a6037916fa09b07429d41e8699586271eb91c'/>
<id>485a6037916fa09b07429d41e8699586271eb91c</id>
<content type='text'>
PR #15822 fixed the warning for direct hyphenated gem requires like
`benchmark/ips` → `benchmark-ips`. However, hyphenated gems often
provide multiple files under their namespace.

For example, `benchmark-ips` provides:
- benchmark/ips.rb
- benchmark/timing.rb
- benchmark/compare.rb

When requiring `benchmark/timing`, the previous fix only checked for
`benchmark-timing` gem (doesn't exist), not `benchmark-ips` which
actually provides the file.

This fix checks if ANY gem matching `{prefix}-*` is in the bundle
specs, which covers all subfeatures provided by hyphenated gems.

Reported in https://github.com/ruby/ruby/pull/15822#issuecomment-123456
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR #15822 fixed the warning for direct hyphenated gem requires like
`benchmark/ips` → `benchmark-ips`. However, hyphenated gems often
provide multiple files under their namespace.

For example, `benchmark-ips` provides:
- benchmark/ips.rb
- benchmark/timing.rb
- benchmark/compare.rb

When requiring `benchmark/timing`, the previous fix only checked for
`benchmark-timing` gem (doesn't exist), not `benchmark-ips` which
actually provides the file.

This fix checks if ANY gem matching `{prefix}-*` is in the bundle
specs, which covers all subfeatures provided by hyphenated gems.

Reported in https://github.com/ruby/ruby/pull/15822#issuecomment-123456
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix incorrect bundled gems warning for hyphenated gem names</title>
<updated>2026-01-08T17:08:38+00:00</updated>
<author>
<name>Chris Hasiński</name>
<email>krzysztof.hasinski@gmail.com</email>
</author>
<published>2026-01-08T00:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8d764da35768073c2e21ffeffa27ff2f3ab589b0'/>
<id>8d764da35768073c2e21ffeffa27ff2f3ab589b0</id>
<content type='text'>
When requiring a file like "benchmark/ips", the warning system would
incorrectly warn about the "benchmark" gem not being a default gem,
even when the user has "benchmark-ips" (a separate third-party gem)
in their Gemfile.

The fix checks if a hyphenated version of the require path exists in
the bundle specs before issuing a warning. For example, requiring
"benchmark/ips" now checks for both "benchmark" and "benchmark-ips"
in the Gemfile.

[Bug #21828]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When requiring a file like "benchmark/ips", the warning system would
incorrectly warn about the "benchmark" gem not being a default gem,
even when the user has "benchmark-ips" (a separate third-party gem)
in their Gemfile.

The fix checks if a hyphenated version of the require path exists in
the bundle specs before issuing a warning. For example, requiring
"benchmark/ips" now checks for both "benchmark" and "benchmark-ips"
in the Gemfile.

[Bug #21828]
</pre>
</div>
</content>
</entry>
<entry>
<title>Update test args with bundled gems. webrick has been removed that targets</title>
<updated>2024-09-30T10:10:16+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-09-30T10:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=81d26814be036a7b15c587d1e1832d9ddd24601e'/>
<id>81d26814be036a7b15c587d1e1832d9ddd24601e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bundled_gems.rb: Add a fast path</title>
<updated>2024-07-22T08:33:07+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-07-19T13:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=82aee1a9467c0f1bd33eb0247c5a0a8b8b9a5049'/>
<id>82aee1a9467c0f1bd33eb0247c5a0a8b8b9a5049</id>
<content type='text'>
[Bug #20641] `Gem::BUNDLED_GEMS.warning?` adds a lot of extra
work on top of `require`. When the call end up atually loading code
the overhead is somewhat marginal.

However it's not uncommon for code to go some late `require` in some
paths, so it's expected that calling `require` with something already
required is somewhat fast, and `bundled_gems.rb` breaks this assumption.

To avoid this, we can have a fast path that in most case allow to
short-circuit all the heavy computations. If we extract the feature
basename and it doesn't match any of the bundled gems we care about
we can return very early.

With this change `require 'date'` is now only 1.33x slower on Ruby
3.3.3, than it was on Ruby 3.2.2, whereas before this change it
was at least 100x slower.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20641] `Gem::BUNDLED_GEMS.warning?` adds a lot of extra
work on top of `require`. When the call end up atually loading code
the overhead is somewhat marginal.

However it's not uncommon for code to go some late `require` in some
paths, so it's expected that calling `require` with something already
required is somewhat fast, and `bundled_gems.rb` breaks this assumption.

To avoid this, we can have a fast path that in most case allow to
short-circuit all the heavy computations. If we extract the feature
basename and it doesn't match any of the bundled gems we care about
we can return very early.

With this change `require 'date'` is now only 1.33x slower on Ruby
3.3.3, than it was on Ruby 3.2.2, whereas before this change it
was at least 100x slower.
</pre>
</div>
</content>
</entry>
</feed>
