mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[rubygems/rubygems] Try to load Gem::BUNDLED_GEMS on Bundler
`bundle exec ruby foo.rb` ignore to load gem_prelude.rb. Because warnings feature
is not working with `bundle exec ruby`.
a0d4ed92a7
This commit is contained in:
parent
e03e872eea
commit
d411d8f5fe
1 changed files with 5 additions and 0 deletions
|
@ -374,6 +374,11 @@ module Bundler
|
|||
specs_by_name = add_default_gems_to(specs)
|
||||
|
||||
reverse_rubygems_kernel_mixin
|
||||
begin
|
||||
# bundled_gems only provide with Ruby 3.3 or later
|
||||
require "bundled_gems"
|
||||
rescue LoadError
|
||||
end unless defined?(::Gem::BUNDLED_GEMS)
|
||||
replace_require(specs) if defined?(::Gem::BUNDLED_GEMS)
|
||||
replace_gem(specs, specs_by_name)
|
||||
stub_rubygems(specs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue