mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
8e5fe13c08
If the following conditions are met: * You have a default version of fileutils and a higher version of fileutils installed as a regular gem. This case is common on ruby 2.6. * You use a bundler generated binstub on a gem setup with a `Gemfile` using the `gemspec` DSL. Then `fileutils` redefinition warnings happen because of the following: The gist of a bundler generated binstub is: ```ruby require "bundler/setup" load Gem.bin_path("rake", "rake") ``` First configure bundler, then load the requested gem. When `require "bundler/setup"` is called under the previously mentioned setup, `ext_conf_builder.rb` ends up being required because of the new validation that gemspecs with rake extensions depend on `rake`. And that loads the latest version of `fileutils` because of using "rubygems monkeypatched require" that auto-chooses the latest version of default gems. After that, when `Gem.bin_path` gets called, `ext_conf_builder.rb` gets required again, but this time already using "bundler's unmonkeypatched require" which means the default version is chosen and thus the redefinition warning happens. The solution as usual is to lazily load `fileutils`. https://github.com/rubygems/rubygems/commit/08d64e5f06 |
||
---|---|---|
.. | ||
commands | ||
core_ext | ||
ext | ||
package | ||
request | ||
request_set | ||
resolver | ||
security | ||
source | ||
ssl_certs | ||
util | ||
available_set.rb | ||
basic_specification.rb | ||
bundler_version_finder.rb | ||
command.rb | ||
command_manager.rb | ||
compatibility.rb | ||
config_file.rb | ||
defaults.rb | ||
dependency.rb | ||
dependency_installer.rb | ||
dependency_list.rb | ||
deprecate.rb | ||
doctor.rb | ||
errors.rb | ||
exceptions.rb | ||
ext.rb | ||
gem_runner.rb | ||
gemcutter_utilities.rb | ||
indexer.rb | ||
install_default_message.rb | ||
install_message.rb | ||
install_update_options.rb | ||
installer.rb | ||
installer_test_case.rb | ||
installer_uninstaller_utils.rb | ||
local_remote_options.rb | ||
mock_gem_ui.rb | ||
name_tuple.rb | ||
package.rb | ||
package_task.rb | ||
path_support.rb | ||
platform.rb | ||
psych_additions.rb | ||
psych_tree.rb | ||
query_utils.rb | ||
rdoc.rb | ||
remote_fetcher.rb | ||
request.rb | ||
request_set.rb | ||
requirement.rb | ||
resolver.rb | ||
s3_uri_signer.rb | ||
safe_yaml.rb | ||
security.rb | ||
security_option.rb | ||
server.rb | ||
source.rb | ||
source_list.rb | ||
spec_fetcher.rb | ||
specification.rb | ||
specification_policy.rb | ||
stub_specification.rb | ||
syck_hack.rb | ||
test_case.rb | ||
test_utilities.rb | ||
text.rb | ||
uninstaller.rb | ||
uri_formatter.rb | ||
uri_parser.rb | ||
uri_parsing.rb | ||
user_interaction.rb | ||
util.rb | ||
validator.rb | ||
version.rb | ||
version_option.rb |