Class: Object

Inherits:
BasicObject
Defined in:
(unknown)

Constant Summary collapse

T_CLASS =

constants

INT2FIX(T_CLASS)
T_MODULE =
INT2FIX(T_MODULE)
T_OBJECT =
INT2FIX(T_OBJECT)
T_DATA =
INT2FIX(T_DATA)
T_ICLASS =
INT2FIX(T_ICLASS)
FL_FREEZE =
INT2FIX(FL_FREEZE)
FL_SINGLETON =
INT2FIX(FL_SINGLETON)

Instance Method Summary collapse

Instance Method Details

#actual_classObject



23
24
25
26
# File 'ext/mult/mult.c', line 23

static VALUE
get_class(VALUE self) {    
  return CLASS_OF(self);
}

#actual_class=(klass) ⇒ Object

set the class of an object



29
30
31
32
33
# File 'ext/mult/mult.c', line 29

static VALUE
set_class(VALUE self, VALUE klass) {
  KLASS_OF(self) = klass;
  return klass;
}

#flagsObject



154
155
156
157
158
# File 'ext/mult/mult.c', line 154

static VALUE
get_flags(VALUE self)
{
  return INT2FIX(RBASIC(self)->flags);
}

#flags=Object

#has_flag?(flag) ⇒ Boolean



160
161
162
163
164
165
# File 'ext/mult/mult.c', line 160

static VALUE
has_flag_p(VALUE self, VALUE flag)
{
  Check_Type(flag, T_FIXNUM);
  return FL_TEST(self, FIX2INT(flag)) ? Qtrue : Qfalse;
}

#IVAR_GET(klass, sym) ⇒ Object

get a raw instance var



68
69
70
71
72
# File 'ext/mult/mult.c', line 68

static VALUE
global_get_ivar(VALUE self, VALUE klass, VALUE sym)
{
  return rb_ivar_get(klass, rb_to_id(sym));
}

#ivar_get(sym) ⇒ Object



74
75
76
77
78
# File 'ext/mult/mult.c', line 74

static VALUE
get_ivar(VALUE self, VALUE sym)
{
  return rb_ivar_get(self, rb_to_id(sym));
}

#IVAR_SET(klass, sym, val) ⇒ Object



87
88
89
90
91
# File 'ext/mult/mult.c', line 87

static VALUE
global_set_ivar(VALUE self, VALUE klass, VALUE sym, VALUE val)
{
  return rb_ivar_set(klass, rb_to_id(sym), val);
}

#ivar_set(sym, val) ⇒ Object

set a raw instance var



81
82
83
84
85
# File 'ext/mult/mult.c', line 81

static VALUE
set_ivar(VALUE self, VALUE sym, VALUE val)
{
  return rb_ivar_set(self, rb_to_id(sym), val);
}

#RCLASS_GET(klass) ⇒ Object

return the actual class of an object



12
13
14
15
# File 'ext/mult/mult.c', line 12

static VALUE
global_get_class(VALUE self, VALUE klass) {    
  return CLASS_OF(klass);
}

#RCLASS_SET(klass, new_klass) ⇒ Object



17
18
19
20
21
# File 'ext/mult/mult.c', line 17

static VALUE
global_set_class(VALUE self, VALUE klass, VALUE new_klass) {    
  KLASS_OF(klass) = new_klass;
  return klass;
}

#RCLASS_SUPER_GET(klass) ⇒ Object

get the actual super class of an object



36
37
38
39
40
# File 'ext/mult/mult.c', line 36

static VALUE
global_get_super(VALUE self, VALUE klass)
{
  return RCLASS_SUPER(klass);
}

#RCLASS_SUPER_SETObject



48
49
50
51
52
# File 'ext/mult/mult.c', line 48

static VALUE
get_super(VALUE self)
{
  return RCLASS_SUPER(self);
}