Class: Array
Instance Method Summary collapse
Instance Method Details
#data_type ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'ext/barracuda.c', line 112
static VALUE
array_data_type_get(VALUE self)
{
VALUE value = rb_ivar_get(self, id_data_type);
if (RTEST(value)) return value;
if (RARRAY_LEN(self) > 0) {
VALUE value = rb_funcall(RARRAY_PTR(self)[0], id_data_type, 0);
if (RTEST(value)) return value;
}
rb_raise(rb_eRuntimeError, "unknown buffer data in array %s",
RSTRING_PTR(rb_inspect(self)));
}
|