class method
ObjectSpace.internal_class_of
(untyped) -> ::Class
ObjectSpace.internal_class_of(obj) → Class or Module
ext/objspace/objspace.c
View on GitHub ↗
static VALUE
objspace_internal_class_of(VALUE self, VALUE obj)
{
VALUE klass;
if (rb_typeddata_is_kind_of(obj, &iow_data_type)) {
obj = (VALUE)DATA_PTR(obj);
}
if (RB_TYPE_P(obj, T_IMEMO)) {
return Qnil;
}
else {
klass = CLASS_OF(obj);
return wrap_klass_iow(klass);
}
}
- MRI specific feature
-
Return internal class of obj.
obj can be an instance of InternalObjectWrapper.
Note that you should not use this method in your application.
See also
.garbage_collect
.internal_super_of
.each_object
.memsize_of
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0