In a C extension, I need to read data from a file using fread.  I also want
to make sure that the file is closed after the read (even if an exception is
raised, for example).  What is the best way to do this in Ruby?  Should I
just use fopen and register the FILE* with Ruby's garbage collection?  Do I
need to manually fclose all my FILE* pointers?   Or is there a better way to
make sure my files get closed automatically?

Thanks,

Brett

-- 
 Brett W. Denner                    Lockheed Martin Aeronautics Co.
 email: Brett.W.Denner / lmco.com     PO Box 748, MZ 9332
 phone: 817-935-1144                Fort Worth, TX 76101
 fax:   817-935-1212