fn alias_method(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_num(2)?;
    let new = vm[0].as_symbol().unwrap();
    let org = vm[1].as_symbol().unwrap();
    let is_new_gvar = new.is_global_var();
    let is_org_gvar = org.is_global_var();
    match (is_new_gvar, is_org_gvar) {
        (true, true) => {}
        (false, false) => {
            // TODO: Is it right?
            let mut class = vm.globals.get_class_if_object(self_val);
            let method = class.get_method_or_nomethod(&mut vm.globals, org)?;
            class.add_method(&mut vm.globals, new, method);
        }
        (true, false) => {
            return Err(RubyError::argument(
                "2nd arg of alias must be a global variable.",
            ))
        }
        (false, true) => {
            return Err(RubyError::argument(
                "2nd arg of alias must be a method name.",
            ))
        }
    }
    Ok(Value::nil())
}
An alias statement is compiled to method call for this func.
TODO: Currently, aliasing of global vars does not work.
ruruby/src/builtin/basicobject.rs