Skip to content

Commit

Permalink
[Truffle] Sprintf float format pad Inf/NaN with space even with zero …
Browse files Browse the repository at this point in the history
…flag
  • Loading branch information
Brandon Fish committed Dec 12, 2016
1 parent 5ac33ad commit 4b215c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/modulo_tags.txt
Expand Up @@ -10,4 +10,3 @@ fails:String#% behaves as if calling Kernel#Float for %g arguments, when the pas
fails:String#% behaves as if calling Kernel#Float for %g arguments, when the passed argument is hexadecimal string
fails:String#% behaves as if calling Kernel#Float for %G arguments, when the passed argument does not respond to #to_ary
fails:String#% behaves as if calling Kernel#Float for %G arguments, when the passed argument is hexadecimal string
fails:String#% pads with spaces for %E with Inf, -Inf, and NaN
Expand Up @@ -114,7 +114,7 @@ public byte[] formatInfinite(int width, int precision, double dval) {
}
width -= len;

if (width > 0 && !hasZeroFlag && !hasMinusFlag) {
if (width > 0 && !hasMinusFlag) {
buf.fill(' ', width);
width = 0;
}
Expand Down

0 comments on commit 4b215c2

Please sign in to comment.