On Tue, Dec 30, 2008 at 8:15 PM, Eric Hodel <drbrain / segment7.net> wrote: > 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? > Gregory Brown offered backport the zlib tests from 1.9 to 1.8 in [ruby-core:20602] Maybe those can help pinpoint the root of the problem. I offer my Windows resources to see if the problem is located on this side of the bench. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry