summaryrefslogtreecommitdiff
path: root/test/json/json_generator_test.rb
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-03-27 09:54:51 +0100
committerHiroshi SHIBATA <[email protected]>2025-03-28 12:44:53 +0900
commit2b9a9300ac4cb00824d59e59f6671a77cc003a1f (patch)
tree2fb5dd72001ab987f16a9cf193eafbac7936191a /test/json/json_generator_test.rb
parent589713bcb5cf4b52278a2cd6074d37c897dc79fc (diff)
[ruby/json] Deprecate `JSON.fast_generate`
https://github.com/ruby/json/commit/6508455d82
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13004
Diffstat (limited to 'test/json/json_generator_test.rb')
-rwxr-xr-xtest/json/json_generator_test.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index f0dec452f3..64636c12c2 100755
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -237,25 +237,6 @@ class JSONGeneratorTest < Test::Unit::TestCase
}.sort_by { |n,| n.to_s }, state.to_h.sort_by { |n,| n.to_s })
end
- def test_fast_state
- state = JSON.create_fast_state
- assert_equal({
- :allow_nan => false,
- :array_nl => "",
- :as_json => false,
- :ascii_only => false,
- :buffer_initial_length => 1024,
- :depth => 0,
- :script_safe => false,
- :strict => false,
- :indent => "",
- :max_nesting => 0,
- :object_nl => "",
- :space => "",
- :space_before => "",
- }.sort_by { |n,| n.to_s }, state.to_h.sort_by { |n,| n.to_s })
- end
-
def test_allow_nan
error = assert_raise(GeneratorError) { generate([JSON::NaN]) }
assert_same JSON::NaN, error.invalid_object