Class | Gem::Package::TarInput
In: | lib/rubygems/package/tar_input.rb
Parent: | Object

### Methods

close each extract_entry load_gemspec new open zipped_stream

### Included Modules

Gem::Package::FSyncDir Enumerable

### Attributes

metadata | [R] |

### Public Class methods

new(io, security_policy = nil)
open(io, security_policy = nil) {|is| ...}

### Public Instance methods

close()
each(&block)
extract_entry(destdir, entry, expected_md5sum = nil)
load_gemspec(io)

Attempt to YAML-load a gemspec from the given io parameter. Return nil if it fails.

zipped_stream(entry)

Return an IO stream for the zipped entry.

NOTE: Originally this method used two approaches, Return a GZipReader directly, or read the GZipReader into a string and return a StringIO on the string. The string IO approach was used for versions of ZLib before 1.2.1 to avoid buffer errors on windows machines. Then we found that errors happened with 1.2.1 as well, so we changed the condition. Then we discovered errors occurred with versions as late as 1.2.3. At this point (after some benchmarking to show we weren‘t seriously crippling the unpacking speed) we threw our hands in the air and declared that this method would use the String IO approach on all platforms at all times. And that‘s the way it is.

[Validate]