# File lib/bundler/runtime.rb, line 94 def prune_cache FileUtils.mkdir_p(cache_path) Bundler.ui.info "Removing outdated .gem files from vendor/cache" Pathname.glob(cache_path.join("*.gem").to_s).each do |gem_path| cached_spec = Gem::Format.from_file_by_path(gem_path.to_s).spec next unless Gem::Platform.match(cached_spec.platform) unless specs.any?{|s| s.full_name == cached_spec.full_name } Bundler.ui.info " * #{File.basename(gem_path.to_s)}" gem_path.rmtree end end end