fn handle_hash_args(&mut self, flag: ArgFlag) -> VMResult {
        if !flag.has_hash_arg() && !flag.has_hash_splat() {
            Ok(Value::nil())
        } else {
            let kwsplat = if flag.has_hash_splat() {
                Some(self.stack_pop())
            } else {
                None
            };
            let mut kw = if flag.has_hash_arg() {
                self.stack_pop()
            } else {
                Value::hash_from_map(FxIndexMap::default())
            };
            let hash = kw.as_mut_hash().unwrap();
            if let Some(kwsplat) = kwsplat {
                for h in kwsplat.as_array().unwrap().iter() {
                    for (k, v) in h.expect_hash("Arg")? {
                        hash.insert(k, v);
                    }
                }
            }
            Ok(kw)
        }
    }
Merge keyword args and hash splat args.
ruruby/src/vm/executor/opt_core.rs