On 9/6/06, Nobuyoshi Nakada <nobu / ruby-lang.org> wrote: > It would be popular indeed, but is an extension library, which may or > may not be loaded. By just accessing, it can be zero if it hasn't > been loaded yet. So you need to ensure it got loaded: > > rb_require("socket"); > rb_funcall(rb_cTCPSocket, rb_intern("for_fd"), 1, INT2NUM(socket)); > > I guess this might be better with autoloading. Nobu, thanks for clearing that up. Now I understand why the more resolved socket classes are not externed by default.