Eric Hodel
9/11/2007 9:27:00 PM
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