fn index(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_num(1)?;
    if let Some(i) = self_val.as_fixnum() {
        if vm[0].as_bignum().is_some() {
            return Ok(Value::integer(0));
        }
        let index = vm[0].coerce_to_fixnum("Index")?;
        let val = if index < 0 || 63 < index {
            0
        } else {
            (i >> index) & 1
        };
        Ok(Value::integer(val))
    } else if let Some(i) = self_val.as_bignum() {
        if vm[0].as_bignum().is_some() {
            return Ok(Value::integer(0));
        }
        let index = vm[0].coerce_to_fixnum("Index")?;
        let val = if index < 0 {
            BigInt::from(0)
        } else {
            (i >> index) & BigInt::from(1)
        };
        Ok(Value::bignum(val))
    } else {
        unreachable!()
    }
}
self[nth] -> Integer
NOT SUPPORTED: self[nth, len] -> Integer
NOT SUPPORTED: self[range] -> Integer

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