From: Eric Hodel Date: 2007-09-12T06:27:04+09:00 Subject: Re: File#file_descriptor On Sep 11, 2007, at 14:16, Wayne E. Seguin wrote: > Hopefully someone knows this... I've googled for a while. > > When writing a C extension, how does one access the file descriptor > of a File object from the C code? $ ri IO#fileno -------------------------------------------------------------- IO#fileno ios.fileno => fixnum ios.to_i => fixnum ------------------------------------------------------------------------ Returns an integer representing the numeric file descriptor for ios. $stdin.fileno #=> 0 $stdout.fileno #=> 1 (also known as to_i) -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars