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.
683 684 685 686 687 688 689 690 |
# File 'objspace.c', line 683
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_id ⇒ Object
Returns the Object#object_id of the internal object.
693 694 695 696 697 698 |
# File 'objspace.c', line 693
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.
675 676 677 678 679 680 |
# File 'objspace.c', line 675
static VALUE
iow_type(VALUE self)
{
VALUE obj = (VALUE)DATA_PTR(self);
return type2sym(BUILTIN_TYPE(obj));
}
|