5a5e9922d0 (master): [ruby/rubygems] Make Gem::CompactIndexClient loadable from a Bundler-shipped copy

0 views
Skip to first unread message

Hiroshi SHIBATA

unread,
Aug 3, 2026, 10:35:13 PM (14 hours ago) Aug 3
to ruby...@g.ruby-lang.org
Hiroshi SHIBATA 2026-08-03 01:25:52 +0000 (Mon, 03 Aug 2026)

New Revision: 5a5e9922d0

https://github.com/ruby/ruby/commit/5a5e9922d0

Log:
[ruby/rubygems] Make Gem::CompactIndexClient loadable from a Bundler-shipped copy

The client's subfiles reached sibling RubyGems files with cross-tree
require_relative, which breaks when the copy shipped inside the Bundler
gem is loaded on an older RubyGems: the relative targets are not part of
that copy. Require them by feature name instead so they resolve against
the host RubyGems. vendored_net_http is newer than the oldest supported
host, so require it defensively; in the Bundler context Gem::Net is
always defined by Bundler's own shim before this file loads. Also guard
the entry point against double loading when the host copy and the
shipped copy are required from different paths.

https://github.com/ruby/rubygems/commit/27d29238d3

Co-Authored-By: Claude Fable 5 <nor...@anthropic.com>

Modified files:
lib/rubygems/compact_index_client.rb
lib/rubygems/compact_index_client/cache_file.rb
lib/rubygems/compact_index_client/http_fetcher.rb
lib/rubygems/compact_index_client/parser.rb
lib/rubygems/compact_index_client/updater.rb
Reply all
Reply to author
Forward
0 new messages