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
This version contains the some style changes by RuboCop.
* 9d810be0ed
* 61ea98a727
* 795893dce3
* 9be7858f7f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* It drop to support < Ruby 2.2
* Cleanup deprecated methods and classes.
* Mark obsoleted methods to deprecate.
* and other enhancements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/ext/ext_conf_builder.rb (build): needs to close
before unlink on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It supports to enable frozen string literal and add `--norc` option for
disable to `.gemrc` configuration.
See 2.5.2 release notes for other fixes and enhancements.
a8aa3bac72/History.txt (L3)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
this version contains many enhancements see http://git.io/vtNwF
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Copy directories to lib/ when installing extensions. This completes
the fix for [ruby-trunk - Bug #9106]
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Compatibly renamed Gem::DependencyResolver to Gem::Resolver.
Added support for git gems in gem.deps.rb and Gemfile.
Fixed resolver bugs.
* test/rubygems: ditto.
* lib/rubygems/LICENSE.txt: Updated to license from RubyGems trunk.
[ruby-trunk - Bug #9086]
* lib/rubygems/commands/which_command.rb: RubyGems now indicates
failure when any file is missing. [ruby-trunk - Bug #9004]
* lib/rubygems/ext/builder: Extensions are now installed into the
extension install directory and the first directory in the require
path from the gem. This allows backwards compatibility with msgpack
and other gems that calculate full require paths.
[ruby-trunk - Bug #9106]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fixed documentation generation when sdoc and json are installed as
gems.
Added some missing documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
building the gem.
* test/rubygems/test_gem_ext_ext_conf_builder.rb: Test for the above.
* lib/rubygems/psych_tree.rb (module Gem): Add backward compatibility
for r41148
* test/rubygems/test_gem_package.rb: Add backward compatibility for
double-slash elimination.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e