Ruby 1.9.3 Reference Manual > All Libraries > Builtin Library > class Numeric > real?

instance method Numeric#real?

real? -> bool

自身が Complex かそのサブクラスのインスタンスでない場合に true を返します。そうでない場合に false を返します。

Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。