Class: UndefClass

Inherits:
Object show all
Defined in:
ext/carray_undef.c

Instance Method Summary collapse

Instance Method Details

#==Object



39
40
41
42
# File 'ext/carray_undef.c', line 39

static VALUE rb_ud_equal (VALUE self, VALUE other) 
{
  return ( self == other ) ? Qtrue : Qfalse;
}

#inspectObject



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

static VALUE rb_ud_inspect (VALUE self) 
{
  return rb_str_new2("UNDEF");
}

#to_fObject



28
29
30
31
32
# File 'ext/carray_undef.c', line 28

static VALUE rb_ud_to_f (VALUE self) 
{
  rb_raise(rb_eTypeError, "can't coerce UNDEF into Float");
  /* return rb_float_new(0.0/0.0); */
}

#to_iObject

return rb_float_new(0.0/0.0);



34
35
36
37
# File 'ext/carray_undef.c', line 34

static VALUE rb_ud_to_i (VALUE self) 
{
  rb_raise(rb_eTypeError, "can't coerce UNDEF into Integer");
}

#to_intObject

return rb_float_new(0.0/0.0);



34
35
36
37
# File 'ext/carray_undef.c', line 34

static VALUE rb_ud_to_i (VALUE self) 
{
  rb_raise(rb_eTypeError, "can't coerce UNDEF into Integer");
}

#to_sObject



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

static VALUE rb_ud_to_s (VALUE self) 
{
  /* rb_raise(rb_eTypeError, "can't coerce UNDEF into String"); */
  return rb_str_new2("UNDEF");
}