From: Guido de Melo Date: 2005-11-15T00:27:16+09:00 Subject: Re: trouble reading a gzipped xml-file Robert Klemme wrote: > You're not closing f here. > [...] > > I'm not so sure that it fails just because of this. It shouldn't, because ruby will determine the end of the file by itself and close the handle on exiting. > Did you try this? > > xmldoc = Zlib::GzipReader.open('file.dia') {|gz| REXML::Document.new gz} irb(main):003:0> xmldoc = Zlib::GzipReader.open('file.dia') {|gz| REXML::Document.new gz} RuntimeError: Zlib::GzipReader is not a valid input stream. It must be either a String, IO, StringIO or Source. This doesn't work either, I'm afraid... Guido