Nobuyoshi Nakada wrote:
> Hi,
> 
> At Wed, 29 Oct 2008 19:02:58 +0900,
> Hongli Lai wrote in [ruby-core:19600]:
>>    ObjectSpace.each_object(o) do
>>      if o.is_a?(IO)
>>        o.close rescue nil
>>      end
>>    end
> 
> Did you want to write like this?
> 
>   ObjectSpace.each_object(IO) do |o|
>     o.close rescue nil
>   end
> 

What about something like

max_fd.times {|i| IO.for_fd(i).close rescue nil}

?

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407