fn rotate_(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_range(0, 1)?;
    let i = if args.len() == 0 {
        1
    } else {
        match vm[0].as_fixnum() {
            Some(i) => i,
            None => return Err(VMError::cant_coerse(vm[0], "Integer")),
        }
    };
    let mut aref = self_val.into_array();
    if aref.is_empty() {
    } else if i >= 0 {
        let i = i % (aref.len() as i64);
        aref.rotate_left(i as usize);
    } else {
        let len = aref.len() as i64;
        let i = (-i) % len;
        aref.rotate_right(i as usize);
    };
    Ok(self_val)
}
## instance method Array#rotate!
- rotate!(cnt = 1) -> Array

https://docs.ruby-lang.org/ja/latest/method/Array/i/rotate=21.html
ruruby/src/builtin/array.rs