Package org.jruby
Class RubyComparable
java.lang.Object
org.jruby.RubyComparable
Implementation of the Comparable module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RubyBoolean
between_p
(ThreadContext context, IRubyObject recv, IRubyObject first, IRubyObject second) cmp_betweenstatic IRubyObject
clamp
(ThreadContext context, IRubyObject recv, IRubyObject arg) static IRubyObject
clamp
(ThreadContext context, IRubyObject recv, IRubyObject min, IRubyObject max) static int
cmpAndCmpint
(ThreadContext context, IRubyObject a, IRubyObject b) static int
cmpAndCmpint
(ThreadContext context, CallSite op_cmp, CallSite op_gt, CallSite op_lt, IRubyObject a, IRubyObject b) static IRubyObject
cmperr
(IRubyObject recv, IRubyObject other) Deprecated.static IRubyObject
cmperr
(ThreadContext context, IRubyObject recv, IRubyObject other) rb_cmperrstatic int
cmpint
(ThreadContext context, IRubyObject val, IRubyObject a, IRubyObject b) static int
cmpint
(ThreadContext context, CallSite op_gt, CallSite op_lt, IRubyObject val, IRubyObject a, IRubyObject b) rb_cmpintstatic RubyModule
createComparable
(ThreadContext context) static IRubyObject
invcmp
(ThreadContext context, IRubyObject recv, IRubyObject other) rb_invcmpstatic IRubyObject
invcmp
(ThreadContext context, ThreadContext.RecursiveFunctionEx<IRubyObject> func, IRubyObject recv, IRubyObject other) rb_invcmpstatic IRubyObject
op_equal
(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_equal (cmp_eq inlined here)static RubyBoolean
op_ge
(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_gestatic RubyBoolean
op_gt
(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_gtstatic RubyBoolean
op_le
(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_lestatic RubyBoolean
op_lt
(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_ltstatic RubyBoolean
op_lt
(ThreadContext context, CallSite cmp, IRubyObject recv, IRubyObject other)
-
Constructor Details
-
RubyComparable
public RubyComparable()
-
-
Method Details
-
createComparable
-
cmpint
public static int cmpint(ThreadContext context, CallSite op_gt, CallSite op_lt, IRubyObject val, IRubyObject a, IRubyObject b) rb_cmpint -
cmpint
-
cmpAndCmpint
-
cmpAndCmpint
public static int cmpAndCmpint(ThreadContext context, CallSite op_cmp, CallSite op_gt, CallSite op_lt, IRubyObject a, IRubyObject b) -
cmperr
Deprecated. -
cmperr
rb_cmperr -
invcmp
rb_invcmp -
invcmp
public static IRubyObject invcmp(ThreadContext context, ThreadContext.RecursiveFunctionEx<IRubyObject> func, IRubyObject recv, IRubyObject other) rb_invcmp -
op_equal
cmp_equal (cmp_eq inlined here) -
op_gt
cmp_gt -
op_ge
cmp_ge -
op_lt
cmp_lt -
op_lt
public static RubyBoolean op_lt(ThreadContext context, CallSite cmp, IRubyObject recv, IRubyObject other) -
op_le
cmp_le -
between_p
public static RubyBoolean between_p(ThreadContext context, IRubyObject recv, IRubyObject first, IRubyObject second) cmp_between -
clamp
-
clamp
public static IRubyObject clamp(ThreadContext context, IRubyObject recv, IRubyObject min, IRubyObject max)
-