Hmm…ok. Without any testing on my own whatsoever, would testing against
empty? instead of nil? be a viable workaround?
I should get a chance to play with this more tomorrow.
From: jeff Putsch [maito:email@example.com]
This does not seem right. First, there is never any data
on the error
object, so why is select saying there is? Second once the
end of the
file is reached, why is select continuing to claim both
have data? I’m sure I’m doing something wrong…
err is in IO object, it’s not the data contained within the object.
I know err is an IO object. My choice of words was cleary poor. The
issue I’m having is #select takes an array of IO objects and should
wait for data to become available on them. It then (should) returns an
array of objects that are ready.
The behavior I’m observing is that it ALWAYS returns, claiming all my
IO objects have data ready on them (even after an EOF on the IO
object). The reality is not all the objects do. In the
example(s) I posted
the “err” object should not have data at all, so it should
not be in the
array of ready object, yet it is.
That, hopefully, better explains what I am seeing and why I
on solving the problem.