c033064788 (master): [ruby/rubygems] Guard the vendored pub_grub against double loading

0 views
Skip to first unread message

Hiroshi SHIBATA

unread,
Aug 3, 2026, 7:50:40 PM (17 hours ago) Aug 3
to ruby...@g.ruby-lang.org
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
Reply all
Reply to author
Forward
0 new messages