Ruby 1.8.7 Reference Manual > All Libraries > library complex > class Numeric > real

instance method Numeric#real

real -> self [added by complex]

複素数として見た場合の実部を返します。 つまり、self が実数の場合はそのまま、selfを返します。