private RubyInteger addAsBignum(ThreadContext context, long other) { return (RubyInteger) RubyBignum.newBignum(context.runtime, value).op_plus(context, other); }
private RubyInteger addAsBignum(ThreadContext context, long other) { return (RubyInteger) RubyBignum.newBignum(context.runtime, value).op_plus(context, other); }
private IRubyObject addAsBignum(ThreadContext context, RubyFixnum other) { return RubyBignum.newBignum(context.runtime, value).op_plus(context, other); }
private IRubyObject addAsBignum(ThreadContext context, long other) { return RubyBignum.newBignum(context.runtime, value).op_plus(context, other); }
private IRubyObject addAsBignum(ThreadContext context, RubyFixnum other) { return RubyBignum.newBignum(context.runtime, value).op_plus(context, other); }
private IRubyObject addAsBignum(ThreadContext context, long other) { return RubyBignum.newBignum(context.runtime, value).op_plus(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 * */ @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); }
private IRubyObject addOther(ThreadContext context, IRubyObject other) { if (other instanceof RubyBignum) { return ((RubyBignum) other).op_plus(context, this); } if (other instanceof RubyFloat) { return context.runtime.newFloat((double) value + ((RubyFloat) other).getDoubleValue()); } return coerceBin(context, "+", other); }
private IRubyObject addOther(ThreadContext context, IRubyObject other) { if (other instanceof RubyBignum) { return ((RubyBignum) other).op_plus(context, this); } if (other instanceof RubyFloat) { return context.runtime.newFloat((double) value + ((RubyFloat) other).getDoubleValue()); } return coerceBin(context, "+", other); }
private IRubyObject addOther(ThreadContext context, IRubyObject other) { if (other instanceof RubyBignum) { return ((RubyBignum) other).op_plus(context, this.value); } if (other instanceof RubyFloat) { return context.runtime.newFloat((double) value + ((RubyFloat) other).getDoubleValue()); } return coerceBin(context, sites(context).op_plus, other); }
private IRubyObject addOther(ThreadContext context, IRubyObject other) { if (other instanceof RubyBignum) { return ((RubyBignum) other).op_plus(context, this.value); } if (other instanceof RubyFloat) { return context.runtime.newFloat((double) value + ((RubyFloat) other).getDoubleValue()); } return coerceBin(context, sites(context).op_plus, other); }
while(occurrences > 0 && pos < encode.limit()) { big = (RubyBignum)big.op_mul(runtime.getCurrentContext(), big128); IRubyObject v = big.op_plus(runtime.getCurrentContext(), RubyBignum.newBignum(runtime, encode.get(pos) & 0x7f)); if(v instanceof RubyFixnum) {
while(occurrences > 0 && pos < encode.limit()) { big = (RubyBignum)big.op_mul(runtime.getCurrentContext(), big128); IRubyObject v = big.op_plus(runtime.getCurrentContext(), RubyBignum.newBignum(runtime, encode.get(pos) & 0x7f)); if(v instanceof RubyFixnum) {
return ((RubyBignum) v).op_plus(context, range.begin);
return ((RubyBignum) v).op_plus(context, range.begin); } else if (v instanceof RubyFloat) { IRubyObject f = TypeConverter.checkFloatType(context.runtime, range.begin);
return ((RubyBignum) v).op_plus(context, range.begin);
return ((RubyBignum) v).op_plus(context, range.begin); } else if (v instanceof RubyFloat) { IRubyObject f = TypeConverter.checkFloatType(context.runtime, range.begin);