> What is the cleanest way to determine the type of a VALUE when extending
> Ruby in C.

I've always used either:

    if (rb_obj_is_instance_of(MyValue, rb_cRange) == Qtrue) ...

or

    if (rb_obj_is_kind_of(MyValue, rb_cRange) == Qtrue) ...

depending on which kind of test I wanted to do. These are the same functions
that get called under the hood when you invoke the Kernel#instance_of? and
Kernel#kind_of? methods from Ruby.

Hope this helps,

Lyle