diff options
author | David RodrÃguez <[email protected]> | 2024-10-08 23:56:32 +0200 |
---|---|---|
committer | git <[email protected]> | 2024-10-14 17:51:24 +0000 |
commit | 48fdb9faa0a408c0855e84cfd6451393c8b67180 () | |
tree | 06ea39baafebbd5c792532c9bba5387e0126460a /lib/rubygems/commands | |
parent | 57404e4369df11f77f089d5d11d310679b2e749f (diff) |
[rubygems/rubygems] Fix `gem contents` for default gems
A default gem does not always live in the same place. For example, Bundler may be installed to `site_dir` when RubyGems have been upgraded. A more reliable way seems to actually activate the default gem, so that we can know for sure where it lives. https://.com/rubygems/rubygems/commit/c69f6dfb18
-rw-r--r-- | lib/rubygems/commands/contents_command.rb | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -103,16 +103,23 @@ prefix or only the files that are requireable. def files_in_default_gem(spec) spec.files.map do |file| - case file - when %r{\A#{spec.bindir}/} - # $' is POSTMATCH - [RbConfig::CONFIG["bindir"], $'] - when /\.so\z/ - [RbConfig::CONFIG["archdir"], file] else - [RbConfig::CONFIG["rubylibdir"], file] end - end end def gem_contents(name) |