Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Commands::ContentsCommand#files_in_gem
files_in_gem(spec)
lib/rubygems/commands/contents_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/commands/contents_command.rb, line 93
def files_in_gem(spec)
gem_path = spec.full_gem_path
if options[:lib_only]
# raw_require_paths rather than require_paths, since the latter prepends
# the absolute extension_dir, which would escape the glob base
require_paths = spec.raw_require_paths
return [] if require_paths.empty?
glob = "{#{require_paths.join ","}}/**/*"
else
glob = "**/*"
end
Dir.glob(glob, base: gem_path).map do |file|
[gem_path, file]
end
end
No documentation available
See also
#files_in_default_gem
#gem_contents
#files_in
#gem_install_dir
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0