Ruby 1.9.2 Reference Manual > All Libraries > Builtin Library > class File::Stat > rdev
rdev -> Integer
デバイスタイプ(スペシャルファイルのみ)を返します。
fs = File::Stat.new($0) #例 p fs.rdev #=> 2