method
remove_old_lib_files
v2_2_9 -
Show latest stable
-
0 notes -
Class: SetupCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
remove_old_lib_files(lib_dir)
public
Hide source
# File lib/rubygems/commands/setup_command.rb, line 417 def remove_old_lib_files lib_dir rubygems_dir = File.join lib_dir, 'rubygems' lib_files = rb_files_in 'lib/rubygems' old_lib_files = rb_files_in rubygems_dir to_remove = old_lib_files - lib_files to_remove.delete_if do |file| file.start_with? 'defaults' end Dir.chdir rubygems_dir do to_remove.each do |file| FileUtils.rm_f file warn "unable to remove old file #{file} please remove it by hand" if File.exist? file end end end