pub(crate) fn to_complex(&self) -> Option<(Real, Real)> {
        match self.unpack() {
            RV::Integer(i) => Some((Real::Integer(i), Real::Integer(0))),
            RV::Float(f) => Some((Real::Float(f), Real::Integer(0))),
            RV::Object(obj) => match obj.kind() {
                ObjKind::COMPLEX => {
                    let RubyComplex { r, i } = *obj.complex();
                    Some((r.to_real().unwrap(), i.to_real().unwrap()))
                }
                _ => None,
            },
            _ => None,
        }
    }
Convert `self` to `Option<(real:Real, imaginary:Real)>`.
If `self` was not a integer nor a float nor a complex, return `None`.
ruruby/src/value/value.rs