Method: Complex#real

Defined in:
complex.c

#realObject

Returns the real part.

Complex(7).real      #=> 7
Complex(9, -4).real  #=> 9

734
735
736
737
738
739
# File 'complex.c', line 734

VALUE
rb_complex_real(VALUE self)
{
    get_dat1(self);
    return dat->real;
}