Hiroshi SHIBATA 2026-08-03 01:22:34 +0000 (Mon, 03 Aug 2026)
New Revision: c033064788
https://github.com/ruby/ruby/commit/c033064788
Log:
[ruby/rubygems] 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.
https://github.com/ruby/rubygems/commit/eaa06c2ed3
Co-Authored-By: Claude Fable 5 <
nor...@anthropic.com>
Modified files:
lib/rubygems/vendor/pub_grub/lib/pub_grub.rb