39 invcmp_recursive(
VALUE x,
VALUE y,
int recursive)
41 if (recursive)
return Qnil;
59 cmp_eq_recursive(
VALUE arg1,
VALUE arg2,
int recursive)
61 if (recursive)
return Qnil;
62 return rb_cmp(arg1, arg2);
78 if (x == y)
return Qtrue;
104 if (cmpint(x, y) > 0)
return Qtrue;
119 if (cmpint(x, y) >= 0)
return Qtrue;
134 if (cmpint(x, y) < 0)
return Qtrue;
149 if (cmpint(x, y) <= 0)
return Qtrue;
171 if (cmpint(x, min) < 0)
return Qfalse;
172 if (cmpint(x, max) > 0)
return Qfalse;
197 if (cmpint(min, max) > 0) {
202 if (c == 0)
return x;
203 if (c < 0)
return min;
205 if (c > 0)
return max;
252 #define rb_intern(str) rb_intern_const(str) void Init_Comparable(void)
void rb_raise(VALUE exc, const char *fmt,...)
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
#define rb_cmpint(cmp, a, b)
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
#define SPECIAL_CONST_P(x)
VALUE rb_define_module(const char *name)
VALUE rb_invcmp(VALUE x, VALUE y)
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
void rb_cmperr(VALUE x, VALUE y)