End of Life Ruby 3.1 has reached end of life and gets no more fixes. 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-3.1.3/lib/rubygems/commands/contents_command.rb, line 92
def files_in_gem(spec)
gem_path = spec.full_gem_path
extra = "/{#{spec.require_paths.join ','}}" if options[:lib_only]
glob = "#{gem_path}#{extra}/**/*"
prefix_re = /#{Regexp.escape(gem_path)}\//
Dir[glob].map do |file|
[gem_path, file.sub(prefix_re, "")]
end
end
No documentation available
See also
#files_in_default_gem
#gem_contents
#files_in
#gem_install_dir
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0