On Dec 29, 2008, at 07:14 AM, Yasuhiro MISE wrote:
> 2. edit ``zipped_stream(entry)'' (line 203--216) as follows:
>
> def zipped_stream(entry)
>   if defined? Rubinius then
>     zis = Zlib::GzipReader.new entry
>     dis = zis.read
>     is = StringIO.new(dis)
>   else
>     # This is Jamis Buck's Zlib workaround for some unknown issue
>     entry.read(10) # skip the gzip header
>     zis = Zlib::Inflate.new(-Zlib::MAX_WBITS)
>
>     ######### EDIT START ###
>     #is = StringIO.new(zis.inflate(entry.read))
>
>     __buf = ""
>     while __temp = entry.read( 128 * 1024 ) do
>       __buf << zis.inflate( __temp )
>     end
>
>     is = StringIO.new( __buf )
>     ######### EDIT END #####
>
>   end
> ensure
>   zis.finish if zis
> end

For what it's worth, I'd really like to see the root cause of this bug  
fixed so this method can be returned to a simpler form:

def zipped_stream(entry)
   zis = Zlib::GzipReader.new entry
   dis = zis.read
   is = StringIO.new(dis)
ensure
   zis.finish if zis
end

Or even:

def zipped_stream(entry)
   Zlib::GzipReader.new entry
end

I'm not sure where the bug actually exists, but I'd really like to see  
the bug fixed.  I'm fairly certain the bug doesn't exist in RubyGems  
and I'm tired of having to continually apply bandaids to RubyGems.

While we're on the subject, what help can I provide so I can  
eventually get back to the bandaid-free version?