In article <4ae01e9d.1702be0a.4536.7381 / mx.google.com>,
  Nobuyoshi Nakada <nobu / ruby-lang.org> writes:

> IO.for_fd is often dangerous.  Basically, such extension
> libraries should expose IO instances, but not file descriptors.
>
> This is a patch to add :autoclose option to IO.for_fd and
> IO.new.

Another possible idea is reference count on fd.  [ruby-dev:22211]
-- 
Tanaka Akira