From: "teeler@..." Date: 2006-08-23T10:45:09+09:00 Subject: using Comparable in C Is there a way i can use the functions defined in compar.c (der, like without copying them)? I'd like to be able to arbitrarily compare VALUE's - do i just have to imitate that code? Assuming that the underlying type has Comparable mixed in, would I just have to do what compar.c does, something like: cmp_ge(x, y) VALUE x, y; { VALUE c = rb_funcall(x, cmp, 1, y); if (NIL_P(c)) return cmperr(); if (rb_cmpint(c, x, y) >= 0) return Qtrue; return Qfalse; } and the same for the rest (le, eq, etc.) ? It'd be nice if i could just call cmp_ge(VALUE, VALUE) but I realize it's not in the C api...