summaryrefslogtreecommitdiff
path: root/lib/rubygems/source.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/source.rb9
1 files changed, 6 insertions, 3 deletions
@@ -135,8 +135,9 @@ class Gem::Source
if File.exist? local_spec
spec = Gem.read_binary local_spec
spec = begin
- Marshal.load(spec)
rescue StandardError
nil
end
@@ -157,8 +158,9 @@ class Gem::Source
end
end
# TODO: Investigate setting Gem::Specification#loaded_from to a URI
- Marshal.load spec
end
##
@@ -188,8 +190,9 @@ class Gem::Source
spec_dump = fetcher.cache_update_path spec_path, local_file, update_cache?
begin
- Gem::NameTuple.from_list Marshal.load(spec_dump)
rescue ArgumentError
if update_cache? && !retried
FileUtils.rm local_file