pub(crate) fn get_super_const(&mut self, mut class: Module, id: IdentId) -> VMResult {
        let is_module = class.is_module();
        let object = self.globals.classes.object;
        loop {
            match self.get_mut_const(class, id)? {
                Some(val) => return Ok(val),
                None => match class.upper() {
                    Some(upper) => class = upper,
                    None => {
                        if is_module {
                            if let Some(v) = self.get_mut_const(object, id)? {
                                return Ok(v);
                            }
                        }
                        return Err(RubyError::uninitialized_constant(id));
                    }
                },
            }
        }
    }
Search class inheritance chain of `class` for a constant `id`, returning the value.
Returns name error if the constant was not defined.
ruruby/src/vm/executor/constants.rs