@JRubyMethod(name = "divmod", required = 1, compat = RUBY1_9) public IRubyObject divmod19(ThreadContext context, IRubyObject other) { if (!other.isNil() && other instanceof RubyFloat && ((RubyFloat)other).getDoubleValue() == 0) { throw context.runtime.newZeroDivisionError(); } return divmod(context, other); }
@JRubyMethod(name = "divmod", required = 1, compat = RUBY1_9) public IRubyObject divmod19(ThreadContext context, IRubyObject other) { if (!other.isNil() && other instanceof RubyFloat && ((RubyFloat)other).getDoubleValue() == 0) { throw context.runtime.newZeroDivisionError(); } return divmod(context, other); }
while (from instanceof RubyBignum) { RubyBignum bignum = (RubyBignum)from; RubyArray ary = (RubyArray)bignum.divmod(context, big128); buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(context.runtime))) | 0x80) & 0xff); from = ary.at(RubyFixnum.zero(context.runtime));
while (from instanceof RubyBignum) { RubyBignum bignum = (RubyBignum)from; RubyArray ary = (RubyArray)bignum.divmod(context, big128); buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(context.runtime))) | 0x80) & 0xff); from = ary.at(RubyFixnum.zero(context.runtime));
while (from instanceof RubyBignum) { RubyBignum bignum = (RubyBignum)from; RubyArray ary = (RubyArray)bignum.divmod(runtime.getCurrentContext(), big128); buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(runtime))) | 0x80) & 0xff); from = ary.at(RubyFixnum.zero(runtime));
while (from instanceof RubyBignum) { RubyBignum bignum = (RubyBignum)from; RubyArray ary = (RubyArray)bignum.divmod(runtime.getCurrentContext(), big128); buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(runtime))) | 0x80) & 0xff); from = ary.at(RubyFixnum.zero(runtime));