Ruby 4.0 リファレンスマニュアル

instance method Numeric#imag

imag -> 0[permalink][rdoc][edit]
imaginary -> 0Ruby 1.9.3 から

常に 0 を返します。

p 12.imag   # => 0
p -12.imag  # => 0
p 1.2.imag  # => 0
p -1.2.imag # => 0

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

[SEE_ALSO] Numeric#realComplex#imag