In the general sense, a VALUE
is just a C pointer to a Ruby object data type. We use VALUE
s in the C code like we would use objects in the Ruby code.
some_function(VALUE arg_object)
{
some_method(arg_object);
}
One would expect that the VALUE
is just a typedef
to a C pointer and there’s a lookup table as to which object it represents, and this would be partially correct. However, there’s also some trickery involved.