fn method_defined(vm: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_range(1, 2)?;
    let name = vm[0].expect_symbol_or_string("1st arg")?;
    let b = if args.len() == 2 && !vm[1].to_bool() {
        self_val
            .into_module()
            .search_method_no_inherit(name)
            .is_some()
    } else {
        self_val.into_module().search_method(name).is_some()
    };
    Ok(Value::bool(b))
}
## instance method Module#method_defined?
- method_defined?(name, inherit=true) -> bool

https://docs.ruby-lang.org/ja/latest/method/Module/i/method_defined=3f.html
ruruby/src/builtin/module.rs