}
}
private static final byte[] getBignumBytes(RubyBignum arg, int base, boolean sign, boolean upper) {
BigInteger val = arg.getValue();
if (sign || base == 10 || val.signum() >= 0) {
return stringToBytes(val.toString(base),upper);
}
// negative values
byte[] bytes = val.toByteArray();