Commit eaa06c2
Guard the vendored pub_grub against double loading
When the same Gem::PubGrub copy is shipped in two gems (RubyGems and
Bundler) and required from different paths, the unguarded entrypoint
reloads it and emits "already initialized constant" warnings. Add an
idempotent guard at the top of the vendored pub_grub.rb so a second load
from any path short-circuits before requiring any subfile. This prepares
Bundler to reuse RubyGems' copy.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent c0d2bbc commit eaa06c2
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| |||
0 commit comments