summaryrefslogtreecommitdiff
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-03-16 13:48:03 +0900
committerHiroshi SHIBATA <[email protected]>2023-03-17 18:50:55 +0900
commit70164eec0f48a691dd039f55ac897036aa32e5cf ()
treee991dceeb7aa2d730d60ae8ca8ce512fa7517823 /lib/rubygems/remote_fetcher.rb
parentfef0313ec79beab2383e30062803a0f21b198b21 (diff)
[rubygems/rubygems] util/rubocop -A --only Style/RescueModifier
https://.com/rubygems/rubygems/commit/b490379eab
-rw-r--r--lib/rubygems/remote_fetcher.rb12
1 files changed, 10 insertions, 2 deletions
@@ -124,7 +124,11 @@ class Gem::RemoteFetcher
local_gem_path = File.join cache_dir, gem_file_name
require "fileutils"
- FileUtils.mkdir_p cache_dir rescue nil unless File.exist? cache_dir
source_uri = Gem::Uri.new(source_uri)
@@ -280,7 +284,11 @@ class Gem::RemoteFetcher
# passes the data.
def cache_update_path(uri, path = nil, update = true)
- mtime = path && File.stat(path).mtime rescue nil
data = fetch_path(uri, mtime)