/** rb_num_coerce_relop * coercion used for relative operators */ @Deprecated // no longer used protected final IRubyObject coerceRelOp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return RubyComparable.cmperr(this, other); } return unwrapCoerced(context, method, other, ary); }
/** rb_num_coerce_relop * coercion used for relative operators */ @Deprecated // no longer used protected final IRubyObject coerceRelOp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return RubyComparable.cmperr(this, other); } return unwrapCoerced(context, method, other, ary); }
/** rb_num_coerce_relop * coercion used for relative operators */ protected final IRubyObject coerceRelOp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return RubyComparable.cmperr(this, other); } return unwrapCoerced(context, method, other, ary); }
protected final IRubyObject coerceRelOp(ThreadContext context, CallSite site, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return RubyComparable.cmperr(this, other); } return unwrapCoerced(context, site, other, ary); }
protected final IRubyObject coerceRelOp(ThreadContext context, CallSite site, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return RubyComparable.cmperr(this, other); } return unwrapCoerced(context, site, other, ary); }
/** rb_num_coerce_relop * coercion used for relative operators */ protected final IRubyObject coerceRelOp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return RubyComparable.cmperr(this, other); } return unwrapCoerced(context, method, other, ary); }
/** rb_num_coerce_bin * coercion taking two arguments */ @Deprecated protected final IRubyObject coerceBin(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, true); return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_cmp * coercion used for comparisons */ @Deprecated // no longer used protected final IRubyObject coerceCmp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return context.nil; // MRI does it! } return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_cmp * coercion used for comparisons */ @Deprecated // no longer used protected final IRubyObject coerceCmp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return context.nil; // MRI does it! } return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_bin * coercion taking two arguments */ @Deprecated protected final IRubyObject coerceBin(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, true); return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
protected final IRubyObject coerceBin(ThreadContext context, CallSite site, IRubyObject other) { RubyArray ary = doCoerce(context, other, true); IRubyObject car = ary.eltInternal(0); return site.call(context, car, car, ary.eltInternal(1)); }
protected final IRubyObject coerceBin(ThreadContext context, CallSite site, IRubyObject other) { RubyArray ary = doCoerce(context, other, true); IRubyObject car = ary.eltInternal(0); return site.call(context, car, car, ary.eltInternal(1)); }
protected final IRubyObject coerceCmp(ThreadContext context, CallSite site, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return context.nil; // MRI does it! } IRubyObject car = ary.eltInternal(0); return site.call(context, car, car, ary.eltInternal(1)); }
protected final IRubyObject coerceCmp(ThreadContext context, CallSite site, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return context.nil; // MRI does it! } IRubyObject car = ary.eltInternal(0); return site.call(context, car, car, ary.eltInternal(1)); }
/** rb_num_coerce_bin * coercion taking two arguments */ protected final IRubyObject coerceBin(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, true); return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_bin * coercion taking two arguments */ protected final IRubyObject coerceBin(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, true); return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_cmp * coercion used for comparisons */ protected final IRubyObject coerceCmp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return getRuntime().getNil(); // MRI does it! } return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_cmp * coercion used for comparisons */ protected final IRubyObject coerceCmp(ThreadContext context, String method, IRubyObject other) { RubyArray ary = doCoerce(context, other, false); if (ary == null) { return getRuntime().getNil(); // MRI does it! } return (ary.eltInternal(0)).callMethod(context, method, ary.eltInternal(1)); }
/** rb_num_coerce_bit * coercion taking two arguments */ protected final IRubyObject coerceBit(ThreadContext context, String method, IRubyObject other) { if (!(other instanceof RubyFixnum) && !(other instanceof RubyBignum)) { RubyArray ary = doCoerce(context, other, true); IRubyObject x = ary.eltInternal(0); IRubyObject y = ary.eltInternal(1); if (!(x instanceof RubyFixnum) && !(x instanceof RubyBignum) && !(y instanceof RubyFixnum) && !(y instanceof RubyBignum)) { coerceFailed(context, other); } return x.callMethod(context, method, y); } return callMethod(context, method, other); }
/** rb_num_coerce_bit * coercion taking two arguments */ protected final IRubyObject coerceBit(ThreadContext context, String method, IRubyObject other) { if (!(other instanceof RubyFixnum) && !(other instanceof RubyBignum)) { RubyArray ary = doCoerce(context, other, true); IRubyObject x = ary.eltInternal(0); IRubyObject y = ary.eltInternal(1); if (!(x instanceof RubyFixnum) && !(x instanceof RubyBignum) && !(y instanceof RubyFixnum) && !(y instanceof RubyBignum)) { coerceFailed(context, other); } return x.callMethod(context, method, y); } return callMethod(context, method, other); }