pub(crate) fn get_class_for_method(&self, val: Value) -> Module {
        if !val.is_packed_value() {
            val.rvalue().class()
        } else if val.as_fixnum().is_some() {
            self.classes.integer
        } else if val.is_packed_num() {
            self.classes.float
        } else if val.is_packed_symbol() {
            self.classes.symbol
        } else {
            match val.get() {
                NIL_VALUE => self.classes.nil_class,
                TRUE_VALUE => self.classes.true_class,
                FALSE_VALUE => self.classes.false_class,
                v => unreachable!("Illegal packed value. {:x}", v),
            }
        }
    }
Get class of `self` for method exploration.
If a direct class of `self` was a singleton class, returns the singleton class.

### panic
panic if `self` was Invalid.
ruruby/src/globals.rs