jbshaldane@hotmail.com (haldane) wrote in message news:<7762c743.0407061228.6daacb5f@posting.google.com>...
I am trying to read from a zlib GzipReader with REXML (actually with
SOAP, it's using REXML).
....
The trouble is that GzipReader is not a subclass of IO. However, it
behaves enough like an IO object to be used as one. A case for duck
typing?
How do you define "behaves enough?"
If you send an email to me about this, or (better yet) post a feature
request to the REXML bug tracker, I'll look into it. I'll try to
remember to take a look at it anyway, but the chances of it getting
lost is much higher if you don't contact me directly.
> I am trying to read from a zlib GzipReader with REXML (actually with
> SOAP, it's using REXML).
...
> The trouble is that GzipReader is not a subclass of IO. However, it
> behaves enough like an IO object to be used as one. A case for duck
> typing?
How do you define "behaves enough?"
Well, what do you need? GzipReader responds to read, getc, readchar,
rewind, each_byte, ungetc, gets, readline, each, each_line, readlines
and some more besides.
If you send an email to me about this, or (better yet) post a feature
request to the REXML bug tracker, I'll look into it. I'll try to
remember to take a look at it anyway, but the chances of it getting
lost is much higher if you don't contact me directly.
jbshaldane@hotmail.com (haldane) wrote in message news:<7762c743.0407071146.1de31654@posting.google.com>...
Well, what do you need? GzipReader responds to read, getc, readchar,
rewind, each_byte, ungetc, gets, readline, each, each_line, readlines
and some more besides.
That should do it. I mostly use readline and some diagnostics about
which byte in the stream I'm currently at. I'll look into; I've got
several things to work on at the moment, so this may take a little
while for me to get to.
Will do. I can't get a response from this page just now, but I will
try again later.
Yeah. We lost another hard drive. Actually, the server physically
moved across town, so we're hoping it is just a bad wire. Ironically,
the drives are RAIDed, so we didn't lose any data; however, when we
set up the RAID, for some reason we didn't RAID the swap space ... so
when the drive went down, it took the kernel with it, which is why you
couldn't access the machine. It should only have been down for a
couple of hours, though, and we've fixed the RAID issue, so we should
be golden.