Method: Object#class
- Defined in:
- object.c
permalink #class ⇒ Class
Returns the class of obj. This method must always be called with an explicit receiver, as class
is also a reserved word in Ruby.
1.class #=> Fixnum
self.class #=> Object
|
# File 'object.c'
/*
* call-seq:
* obj.class -> class
*
* Returns the class of <i>obj</i>. This method must always be
* called with an explicit receiver, as <code>class</code> is also a
* reserved word in Ruby.
*
* 1.class #=> Fixnum
* self.class #=> Object
*/
VALUE
rb_obj_class(VALUE obj)
{
return rb_class_real(CLASS_OF(obj));
}
|