Ruby
2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
|
Go to the documentation of this file.
40 invcmp_recursive(
VALUE x,
VALUE y,
int recursive)
42 if (recursive)
return Qnil;
60 cmp_eq_recursive(
VALUE arg1,
VALUE arg2,
int recursive)
62 if (recursive)
return Qnil;
63 return rb_cmp(arg1, arg2);
79 if (x == y)
return Qtrue;
105 if (cmpint(x, y) > 0)
return Qtrue;
120 if (cmpint(x, y) >= 0)
return Qtrue;
135 if (cmpint(x, y) < 0)
return Qtrue;
150 if (cmpint(x, y) <= 0)
return Qtrue;
172 if (cmpint(x, min) < 0)
return Qfalse;
173 if (cmpint(x, max) > 0)
return Qfalse;
233 if (!
NIL_P(min) && cmpint(min, max) > 0)
goto arg_error;
236 else if (cmpint(min, max) > 0) {
243 if (c == 0)
return x;
244 if (c < 0)
return min;
248 if (c > 0)
return max;
297 #define rb_intern(str) rb_intern_const(str)
#define range(low, item, hi)
VALUE rb_define_module(const char *name)
VALUE rb_invcmp(VALUE x, VALUE y)
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
#define SPECIAL_CONST_P(x)
void Init_Comparable(void)
#define rb_cmpint(cmp, a, b)
void rb_raise(VALUE exc, const char *fmt,...)
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
void rb_cmperr(VALUE x, VALUE y)
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
const char * rb_builtin_class_name(VALUE x)