summaryrefslogtreecommitdiff
path: root/lib/rubygems/package/tar_input.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/package/tar_input.rb')
-rw-r--r--lib/rubygems/package/tar_input.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/package/tar_input.rb b/lib/rubygems/package/tar_input.rb
index 587d79c493..401df80a83 100644
--- a/lib/rubygems/package/tar_input.rb
+++ b/lib/rubygems/package/tar_input.rb
@@ -117,7 +117,11 @@ class Gem::Package::TarInput
@tarreader.rewind
@fileops = Gem::FileOperations.new
- raise Gem::Package::FormatError, "No metadata found!" unless has_meta
+ unless has_meta then
+ path = io.path if io.respond_to? :path
+ error = Gem::Package::FormatError.new 'no metadata found', path
+ raise error
+ end
end
def close