Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/src/main/java/org/jruby/util/Sprintf.java
Original file line number Diff line number Diff line change
@@ -864,12 +864,8 @@ else if ((flags & FLAG_MINUS) != 0) {
break;
}

if ((flags & FLAG_PRECISION) == 0) {
precision = 6;
}

NumberFormat nf = getNumberFormat(args.locale);
nf.setMaximumFractionDigits(precision);
nf.setMaximumFractionDigits(Integer.MAX_VALUE);
String str = nf.format(dval);

// grrr, arghh, want to subclass sun.misc.FloatingDecimal, but can't,
@@ -967,6 +963,9 @@ else if ((flags & FLAG_MINUS) != 0) {
} else {
signChar = 0;
}
if ((flags & FLAG_PRECISION) == 0) {
precision = 6;
}

switch(fchar) {
case 'E':

0 comments on commit 06bd7f5

Please sign in to comment.