>>>>> "P" == Paul C <paul_c / passtheaardvark.com> writes:

P> # irb --prompt xmp

P> require 'Zip'

[...]

P> ruby 1.6.3 (2001-03-07) [i386-netbsd1.5]
P> Abort (core dumped)

 It was not possible, for me, to reproduce this problem

pigeon% irb
irb(main):001:0> require 'Zip'
true
irb(main):002:0> z = Zip::ZipFile.new "test.zip"
#<Zip::ZipFile:0x401ca144 @name="test.zip">
irb(main):003:0> z.entries { |e| print e.path, "\n" }    
extconf.rb
Makefile
#<Zip::ZipFile:0x401ca144 @name="test.zip">
irb(main):004:0> z.entry "extconf.rb"  
#<Zip::ZipEntry:0x401b6360 @path="extconf.rb">
irb(main):005:0> z.entry "zzzzzzz" 
RuntimeError: Entry not found
(irb):5:in `entry'
(irb):5:in `irb_binding'
irb(main):006:0> z.entry "extconf.rb"
#<Zip::ZipEntry:0x401b08c0 @path="extconf.rb">
irb(main):007:0> 
pigeon% 

 I've tried with 1.6.2 and 1.7.0

P>     if ( (buffer = (char *) calloc(length,sizeof(char))) == NULL ) {
P>         rb_raise ( rb_eRuntimeError, "could not allocate buffery memory" ) ;
P>     }

 Possible memory leak , buffer is never free

P>     try {
is-> read ( buffer,length ) ;
P>     }
P>     catch ( exception &excp ) {
P>         rb_raise ( rb_eRuntimeError, excp.what() ) ;
P>     }

P>     data = rb_str_new ( buffer, length ) ;

P>     DEBUG_METHOD("Got Buffer Length",data,length) ;
P>     DEBUG_MSG("Leaving Function getDataFromInputStream") ;

P>     return data ;
P> }


Guy Decoux