mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
[rubygems/rubygems] Allow disabling RubyGems require decorations
Currently Bundler needs to do cumbersome operations to revert custom
RubyGems require on a `bundler/setup` context. This causes issues when
third party gems also monkeypatch require, since Bundler will also undo
those decorations.
This commit allows it to use the simpler approach of properly telling
RubyGems that it needs to default to built-in require without any extra
magic.
1df5009e14
Co-authored-by: Xavier Noria <fxn@hashref.com>
This commit is contained in:
parent
022acb9593
commit
4cbfd87e5a
Notes:
git
2023-01-31 01:49:29 +00:00
2 changed files with 138 additions and 124 deletions
|
@ -181,6 +181,8 @@ module Gem
|
|||
|
||||
@default_source_date_epoch = nil
|
||||
|
||||
@discover_gems_on_require = true
|
||||
|
||||
##
|
||||
# Try to activate a gem containing +path+. Returns true if
|
||||
# activation succeeded or wasn't needed because it was already
|
||||
|
@ -1162,8 +1164,16 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
# RubyGems distributors (like operating system package managers) can
|
||||
# disable RubyGems update by setting this to error message printed to
|
||||
# end-users on gem update --system instead of actual update.
|
||||
|
||||
attr_accessor :disable_system_update_message
|
||||
|
||||
##
|
||||
# Whether RubyGems should enhance builtin `require` to automatically
|
||||
# check whether the path required is present in installed gems, and
|
||||
# automatically activate them and add them to `$LOAD_PATH`.
|
||||
|
||||
attr_accessor :discover_gems_on_require
|
||||
|
||||
##
|
||||
# Hash of loaded Gem::Specification keyed by name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue