In Ruby, sprintf specifier %u should behave as %d; fix #3730

Since there's no unsigned integer in Ruby. Binary, octal and
hexadecimal negative numbers can be represented by using 2's
compliment. But decimal (not being power of 2) cannot be use
that kind of format.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-07-05 17:48:40 +09:00
parent bd66c5d716
commit b643a1a8bc
+1 -1
View File
@@ -838,10 +838,10 @@ retry:
case 'b':
case 'B':
base = 2; break;
case 'u':
case 'd':
case 'i':
sign = 1;
case 'u':
default:
base = 10; break;
}