diff options
| author | Chris Hasiński <krzysztof.hasinski@gmail.com> | 2026-01-19 18:35:52 +0100 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2026-02-12 18:10:02 +0900 |
| commit | b698c35590671e2b6f5920ca01c83ec4ebea610b (patch) | |
| tree | fa7f80b70aa4815fb6541cc986e505e007352900 /test/ruby/test_rubyoptions.rb | |
| parent | d57b75297391af5b5d4f279eeeec084df37e9618 (diff) | |
Fix bundled gems warning for all subfeatures of hyphenated gems
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
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
0 files changed, 0 insertions, 0 deletions
