fn gcdlcm(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_num(1)?;
    let rhs = vm[0];
    if let Some(i) = self_val.as_fixnum() {
        let res = if let Some(b2) = rhs.as_bignum() {
            let (gcd, lcm) = BigInt::from(i).gcd_lcm(b2);
            vec![Value::bignum(gcd), Value::bignum(lcm)]
        } else if let Some(i2) = rhs.as_fixnum() {
            let (gcd, lcm) = arith::safe_gcd_lcm(&i, &i2);
            vec![gcd, lcm]
        } else {
            return Err(VMError::cant_coerse(rhs, "Integer"));
        };
        Ok(Value::array_from(res))
    } else if let Some(b) = self_val.as_bignum() {
        let res = if let Some(b2) = rhs.as_bignum() {
            b.gcd_lcm(b2)
        } else if let Some(i2) = rhs.as_fixnum() {
            b.gcd_lcm(&BigInt::from(i2))
        } else {
            return Err(VMError::cant_coerse(rhs, "Integer"));
        };
        Ok(Value::array_from(vec![
            Value::bignum(res.0),
            Value::bignum(res.1),
        ]))
    } else {
        unreachable!()
    }
}
gcdlcm(n) -> [Integer]

https://docs.ruby-lang.org/ja/latest/method/Integer/i/gcdlcm.html
ruruby/src/builtin/integer.rs