Class: ObjectSpace::InternalObjectWrapper

Inherits:
Object
  • Object
show all
Defined in:
objspace.c

Instance Method Summary collapse

Instance Method Details

#inspectObject

See Object#inspect.



697
698
699
700
701
702
703
704
# File 'objspace.c', line 697

static VALUE
iow_inspect(VALUE self)
{
    VALUE obj = (VALUE)DATA_PTR(self);
    VALUE type = type2sym(BUILTIN_TYPE(obj));

    return rb_sprintf("#<InternalObject:%p %"PRIsVALUE">", (void *)obj, rb_sym2str(type));
}

#internal_object_idObject

Returns the Object#object_id of the internal object.



707
708
709
710
711
712
# File 'objspace.c', line 707

static VALUE
iow_internal_object_id(VALUE self)
{
    VALUE obj = (VALUE)DATA_PTR(self);
    return rb_obj_id(obj);
}

#typeObject

Returns the type of the internal object.



689
690
691
692
693
694
# File 'objspace.c', line 689

static VALUE
iow_type(VALUE self)
{
    VALUE obj = (VALUE)DATA_PTR(self);
    return type2sym(BUILTIN_TYPE(obj));
}