instance method
Gem::Commands::SetupCommand#remove_old_lib_files
remove_old_lib_files(lib_dir)
lib/rubygems/commands/setup_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/commands/setup_command.rb, line 500
def remove_old_lib_files(lib_dir)
lib_dirs = { File.join(lib_dir, "rubygems") => "lib/rubygems" }
lib_dirs[File.join(lib_dir, "bundler")] = "bundler/lib/bundler"
lib_dirs.each do |old_lib_dir, new_lib_dir|
lib_files = files_in(new_lib_dir)
old_lib_files = files_in(old_lib_dir)
to_remove = old_lib_files - lib_files
gauntlet_rubygems = File.join(lib_dir, "gauntlet_rubygems.rb")
to_remove << gauntlet_rubygems if File.exist? gauntlet_rubygems
to_remove.delete_if do |file|
file.start_with? "defaults"
end
remove_file_list(to_remove, old_lib_dir)
end
end
No documentation available
See also
#remove_old_bin_files
#remove_old_man_files
#remove_file_list
#shebang
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0