diff options
-rw-r--r-- | ext/json/fbuffer/fbuffer.h | 4 | ||||
-rw-r--r-- | ext/json/vendor/jeaiii-ltoa.h | 3 | ||||
-rwxr-xr-x | test/json/json_generator_test.rb | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/ext/json/fbuffer/fbuffer.h b/ext/json/fbuffer/fbuffer.h index b56955e8f4..dc0bf32344 100644 --- a/ext/json/fbuffer/fbuffer.h +++ b/ext/json/fbuffer/fbuffer.h @@ -186,7 +186,7 @@ static void fbuffer_append_long(FBuffer *fb, long number) * the number of resulting characters. * * We do know, however, that the `number` argument is always in the - * range 0xc000000000000000 to 0x3fffffffffffffff, or, in decimal, + * range 0xc000000000000000 to 0x3fffffffffffffff, or, in decimal, * -4611686018427387904 to 4611686018427387903. The max number of chars * generated is therefore 20 (including a potential sign character). */ @@ -198,7 +198,7 @@ static void fbuffer_append_long(FBuffer *fb, long number) if (number < 0) { fbuffer_append_reserved_char(fb, '-'); - /* + /* * Since number is always > LONG_MIN, `-number` will not overflow * and is always the positive abs() value. */ diff --git a/ext/json/vendor/jeaiii-ltoa.h b/ext/json/vendor/jeaiii-ltoa.h index f83e036e78..bb3c231a84 100644 --- a/ext/json/vendor/jeaiii-ltoa.h +++ b/ext/json/vendor/jeaiii-ltoa.h @@ -87,7 +87,7 @@ static u64_t mask24 = (u64(1) << 24) - 1; static u64_t mask32 = (u64(1) << 32) - 1; static u64_t mask57 = (u64(1) << 57) - 1; -static +static char* to_text_from_ulong(char* b, u64_t n) { if (n < u32(1e2)) { @@ -254,4 +254,3 @@ char* to_text_from_ulong(char* b, u64_t n) { #pragma GCC diagnostic pop #endif // JEAIII_TO_TEXT_H_ - diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb index 9cca447e2a..f0dec452f3 100755 --- a/test/json/json_generator_test.rb +++ b/test/json/json_generator_test.rb @@ -707,7 +707,7 @@ class JSONGeneratorTest < Test::Unit::TestCase assert_equal expected, value.to_json end end - + def test_numbers_of_various_sizes numbers = [ 0, 1, -1, 9, -9, 13, -13, 91, -91, 513, -513, 7513, -7513, |