summaryrefslogtreecommitdiff
path: root/lib/rubygems/source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/source.rb')
-rw-r--r--lib/rubygems/source.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb
index 74ea2c61b3..c57b173a44 100644
--- a/lib/rubygems/source.rb
+++ b/lib/rubygems/source.rb
@@ -135,7 +135,11 @@ class Gem::Source
if File.exist? local_spec
spec = Gem.read_binary local_spec
- spec = Marshal.load(spec) rescue nil
+ spec = begin
+ Marshal.load(spec)
+ rescue
+ nil
+ end
return spec if spec
end