fileno()
public
Returns an integer representing the numeric file descriptor for
ios.
$stdin.fileno
$stdout.fileno
Show source
static VALUE
rb_io_fileno(VALUE io)
{
rb_io_t *fptr = RFILE(io)->fptr;
int fd;
rb_io_check_closed(fptr);
fd = fptr->fd;
return INT2FIX(fd);
}