diff options
author | Étienne Barrié <[email protected]> | 2025-02-05 12:35:30 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-02-06 16:02:03 +0900 |
commit | b4bfbcaddcc4d5ec82631df3fc53b3a3ac65edb7 (patch) | |
tree | e267e4a3709bd77d4dd03eb35f05f44b88500db3 /test/json/json_generator_test.rb | |
parent | f865148e1926f838cac8b4449abfc5d402d0d015 (diff) |
Optimize Symbol generation in strict mode
Co-authored-by: Jean Boussier <[email protected]>
Diffstat (limited to 'test/json/json_generator_test.rb')
-rwxr-xr-x | test/json/json_generator_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb index d97f0505f7..942802d62f 100755 --- a/test/json/json_generator_test.rb +++ b/test/json/json_generator_test.rb @@ -86,6 +86,10 @@ class JSONGeneratorTest < Test::Unit::TestCase assert_equal '42', dump(42, strict: true) assert_equal 'true', dump(true, strict: true) + + assert_equal '"hello"', dump(:hello, strict: true) + assert_equal '"hello"', :hello.to_json(strict: true) + assert_equal '"World"', "World".to_json(strict: true) end def test_generate_pretty |