imag -> 0[permalink][rdoc][edit]imaginary -> 0Ruby 1.9.3 から() → Numeric-
0を返します。Complex では
例selfの虚部を返すよう再定義されています。p 12.imag # => 0 p -12.imag # => 0 p 1.2.imag # => 0 p -1.2.imag # => 0Numericのサブクラスは必要に応じてこのメソッドを適切に再定義しなければなりません。[SEE_ALSO] Numeric#real、Complex#imag