fn sort_by(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_num(0)?;
    let block = to_enum_str!(vm, self_val, args, "sort_by");
    let mut ary = vec![];
    {
        let f = vm.eval_block_map1(block);
        for v in &**self_val.as_array().unwrap() {
            let v1 = f(vm, *v)?;
            vm.temp_push(v1);
            ary.push((*v, v1));
        }
    }
    vm.sort_by(&mut ary, |vm, a, b| {
        Ok(vm.eval_compare(b.1, a.1)?.to_ordering()?)
    })?;

    Ok(Value::array_from(ary.iter().map(|x| x.0).collect()))
}
## instance method Enumerator#sort_by
- sort_by -> Enumerator
- sort_by {|item| ... } -> [[object]]

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