Ruby 1.9.0 リファレンスマニュアル > ライブラリ一覧 > library _builtin > class IO > fileno
fileno -> Integer
to_i -> Integer
ファイル記述子を表す整数を返します。