Commit 485a603
Fix bundled gems warning for all subfeatures of hyphenated gems
PR ruby#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 ruby#15822 (comment)1 parent f3bfffe commit 485a603
2 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 134 | + | |
| 135 | + | |
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
0 commit comments