Class: ObjectSpace::InternalObjectWrapper
- Inherits:
-
Object
- Object
- ObjectSpace::InternalObjectWrapper
- Defined in:
- objspace.c
Instance Method Summary collapse
-
#inspect ⇒ Object
See Object#inspect.
-
#internal_object_id ⇒ Object
Returns the Object#object_id of the internal object.
-
#type ⇒ Object
Returns the type of the internal object.
Instance Method Details
#inspect ⇒ Object
See Object#inspect.
542 543 544 545 546 547 548 549 |
# File 'objspace.c', line 542
static VALUE
iow_inspect(VALUE self)
{
VALUE obj = (VALUE)DATA_PTR(self);
VALUE type = type2sym(BUILTIN_TYPE(obj));
return rb_sprintf("#<InternalObject:%p %s>", (void *)obj, rb_id2name(SYM2ID(type)));
}
|
#internal_object_id ⇒ Object
Returns the Object#object_id of the internal object.
552 553 554 555 556 557 |
# File 'objspace.c', line 552
static VALUE
iow_internal_object_id(VALUE self)
{
VALUE obj = (VALUE)DATA_PTR(self);
return rb_obj_id(obj);
}
|
#type ⇒ Object
Returns the type of the internal object.
534 535 536 537 538 539 |
# File 'objspace.c', line 534
static VALUE
iow_type(VALUE self)
{
VALUE obj = (VALUE)DATA_PTR(self);
return type2sym(BUILTIN_TYPE(obj));
}
|