pub(crate) fn define_singleton_method(
        &mut self,
        target_obj: Value,
        id: IdentId,
        method: FnId,
    ) -> Result<(), RubyError> {
        target_obj
            .get_singleton_class()?
            .add_method(&mut self.globals, id, method);
        Ok(())
    }
Define a method on a singleton class of `target_obj`.
ruruby/src/vm/executor.rs