diff options
author | Jean Boussier <[email protected]> | 2025-05-23 09:28:56 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-05-26 11:46:12 +0900 |
commit | f171a263f76d6505b891f848bc5393ebbb973be3 () | |
tree | 449db66c4f2c00e83aa3c43b8f7d3e7076689065 /test/json/json_generator_test.rb | |
parent | aa00a2d07bf56fc5def659e06104eb3173803ca7 (diff) |
[ruby/json] Fix: generate_json_float to reserve enough memory for large negative floats.
Fix: https://.com/ruby/json/issues/807 Since https://.com/ruby/json/pull/800, `fpconv_dtoa` can actually generate up to 28 chars. https://.com/ruby/json/commit/d73ae93d3c
-rwxr-xr-x | test/json/json_generator_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -795,6 +795,11 @@ class JSONGeneratorTest < Test::Unit::TestCase expecteds << "1746861937.7842371" end values.zip(expecteds).each do |value, expected| assert_equal expected, value.to_json end |