fn uniq(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_num(0)?;
    let aref = self_val.into_array();
    let mut h = FxHashSet::default();
    let mut v = vec![];
    match &args.block {
        None => {
            let mut recursive = false;
            for elem in &**aref {
                if self_val.id() == elem.id() {
                    if !recursive {
                        v.push(*elem);
                        recursive = true;
                    }
                } else if h.insert(HashKey(*elem)) {
                    v.push(*elem);
                }
            }
        }
        Some(block) => {
            let f = vm.eval_block_map1(block);
            for elem in &**aref {
                let res = f(vm, *elem)?;
                if h.insert(HashKey(res)) {
                    v.push(*elem);
                };
            }
        }
    };
    Ok(Value::array_from(v))
}
## instance method Array#uniq
- uniq -> Array
- uniq {|item| ... } -> Array

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