Refine search
/** rb_class_new_instance * */ @JRubyMethod(name = "new", omit = true) public IRubyObject newInstance(ThreadContext context, Block block) { IRubyObject obj = allocate(); baseCallSites[CS_IDX_INITIALIZE].call(context, obj, obj, block); return obj; }
/** * The != method implemented for BasicObject. * * @param context thread context * @param other other object * @return false if this == other, true otherwise */ @JRubyMethod(name = "!=", required = 1) public IRubyObject op_not_equal(ThreadContext context, IRubyObject other) { return context.runtime.newBoolean(!sites(context).op_equal.call(context, this, this, other).isTrue()); }
@JRubyMethod(name = "new", omit = true) public IRubyObject newInstance(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) { IRubyObject obj = allocate(); baseCallSites[CS_IDX_INITIALIZE].call(context, obj, obj, arg0, arg1, block); return obj; }
/** * The != method implemented for BasicObject. * * @param context thread context * @param other other object * @return false if this == other, true otherwise */ @JRubyMethod(name = "!=", required = 1) public IRubyObject op_not_equal(ThreadContext context, IRubyObject other) { return context.runtime.newBoolean(!sites(context).op_equal.call(context, this, this, other).isTrue()); }
@JRubyMethod(name = "default") public IRubyObject default_value_get(ThreadContext context, IRubyObject arg) { if ((flags & PROCDEFAULT_HASH_F) != 0) { return sites(context).call.call(context, ifNone, ifNone, this, arg); } return ifNone == UNDEF ? context.nil : ifNone; }
public static boolean invokeEqqForCaseWhen(CallSite callSite, ThreadContext context, IRubyObject caller, IRubyObject arg, IRubyObject receiver0, IRubyObject receiver1, IRubyObject receiver2) { IRubyObject result = callSite.call(context, caller, receiver0, arg); if (result.isTrue()) return true; return invokeEqqForCaseWhen(callSite, context, caller, arg, receiver1, receiver2); }
/** num_abs * */ @JRubyMethod(name = "abs") public IRubyObject abs(ThreadContext context) { if (sites(context).op_lt.call(context, this, this, RubyFixnum.zero(context.runtime)).isTrue()) { return sites(context).op_uminus.call(context, this, this); } return this; }
/** rb_class_new_instance * */ @JRubyMethod(name = "new", omit = true) public IRubyObject newInstance(ThreadContext context, Block block) { IRubyObject obj = allocate(); baseCallSites[CS_IDX_INITIALIZE].call(context, obj, obj, block); return obj; }
public static boolean invokeEqqForCaseWhen(CallSite callSite, ThreadContext context, IRubyObject caller, IRubyObject arg, IRubyObject receiver0, IRubyObject receiver1, IRubyObject receiver2) { IRubyObject result = callSite.call(context, caller, receiver0, arg); if (result.isTrue()) return true; return invokeEqqForCaseWhen(callSite, context, caller, arg, receiver1, receiver2); }
/** num_abs * */ @JRubyMethod(name = "abs") public IRubyObject abs(ThreadContext context) { if (sites(context).op_lt.call(context, this, this, RubyFixnum.zero(context.runtime)).isTrue()) { return sites(context).op_uminus.call(context, this, this); } return this; }