/** rb_big_plus * */ @Override public IRubyObject op_plus(ThreadContext context, IRubyObject other) { if (other instanceof RubyFixnum) { return op_plus(context, ((RubyFixnum) other).getLongValue()); } if (other instanceof RubyBignum) { return op_plus(context, ((RubyBignum) other).value); } if (other instanceof RubyFloat) { return addFloat((RubyFloat) other); } return addOther(context, other); }
/** rb_big_plus * */ @Override public IRubyObject op_plus(ThreadContext context, IRubyObject other) { if (other instanceof RubyFixnum) { return op_plus(context, ((RubyFixnum) other).getLongValue()); } if (other instanceof RubyBignum) { return op_plus(context, ((RubyBignum) other).value); } if (other instanceof RubyFloat) { return addFloat((RubyFloat) other); } return addOther(context, other); }
/** rb_big_plus * */ @JRubyMethod(name = "+", required = 1) public IRubyObject op_plus(ThreadContext context, IRubyObject other) { if (other instanceof RubyFixnum) { return addFixnum(((RubyFixnum)other).getLongValue()); } else if (other instanceof RubyBignum) { return addBignum(((RubyBignum)other).value); } else if (other instanceof RubyFloat) { return addFloat((RubyFloat)other); } return addOther(context, other); }
/** rb_big_plus * */ @JRubyMethod(name = "+", required = 1) public IRubyObject op_plus(ThreadContext context, IRubyObject other) { if (other instanceof RubyFixnum) { return addFixnum(((RubyFixnum)other).getLongValue()); } else if (other instanceof RubyBignum) { return addBignum(((RubyBignum)other).value); } else if (other instanceof RubyFloat) { return addFloat((RubyFloat)other); } return addOther(context, other); }