mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
Merge the latest stable versions of RubyGems and Bundler to Ruby 3.2.x (#7061)
[Bug #19350] * Merge RubyGems-3.4.2 and Bundler-2.4.2 * Merge RubyGems-3.4.3 and Bundler-2.4.3 * Generate parser-text.rb of racc when sync it * Ignore LICENSE files of libraries vendored in rubygems [ci skip] * Adjust spec of bundler like as `sync_default_gems` [ci skip] * Fixed a typo * Removed vendored LICENSE file. * Update LEGAL sections for pub_grub * Merge RubyGems-3.4.4 and Bundler-2.4.4 * Merge RubyGems-3.4.5 and Bundler-2.4.5 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
fee5b8f263
commit
a22eca8231
105 changed files with 1337 additions and 752 deletions
|
@ -13,12 +13,12 @@ module Kernel
|
|||
|
||||
# Make sure we have a reference to Ruby's original Kernel#require
|
||||
unless defined?(gem_original_require)
|
||||
# :stopdoc:
|
||||
alias gem_original_require require
|
||||
private :gem_original_require
|
||||
# :startdoc:
|
||||
end
|
||||
|
||||
file = Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES ? "<internal:#{__FILE__}>" : __FILE__
|
||||
module_eval <<'RUBY', file, __LINE__ + 1 # rubocop:disable Style/EvalWithLocation
|
||||
##
|
||||
# When RubyGems is required, Kernel#require is replaced with our own which
|
||||
# is capable of loading gems on demand.
|
||||
|
@ -33,7 +33,7 @@ module Kernel
|
|||
# The normal <tt>require</tt> functionality of returning false if
|
||||
# that file has already been loaded is preserved.
|
||||
|
||||
def require(path)
|
||||
def require(path) # :doc:
|
||||
if RUBYGEMS_ACTIVATION_MONITOR.respond_to?(:mon_owned?)
|
||||
monitor_owned = RUBYGEMS_ACTIVATION_MONITOR.mon_owned?
|
||||
end
|
||||
|
@ -147,17 +147,17 @@ module Kernel
|
|||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||
return gem_original_require(path)
|
||||
rescue LoadError => load_error
|
||||
RUBYGEMS_ACTIVATION_MONITOR.enter
|
||||
if load_error.path == path
|
||||
RUBYGEMS_ACTIVATION_MONITOR.enter
|
||||
|
||||
begin
|
||||
if load_error.path == path and Gem.try_activate(path)
|
||||
require_again = true
|
||||
begin
|
||||
require_again = Gem.try_activate(path)
|
||||
ensure
|
||||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||
end
|
||||
ensure
|
||||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||
end
|
||||
|
||||
return gem_original_require(path) if require_again
|
||||
return gem_original_require(path) if require_again
|
||||
end
|
||||
|
||||
raise load_error
|
||||
ensure
|
||||
|
@ -168,7 +168,6 @@ module Kernel
|
|||
end
|
||||
end
|
||||
end
|
||||
RUBY
|
||||
|
||||
private :require
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue