diff options
| author | tompng <tomoyapenguin@gmail.com> | 2025-10-05 02:26:46 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-10-06 11:45:43 +0900 |
| commit | b22fd7c40d875b136693d53bcd36e756feef2c6d (patch) | |
| tree | aa842ceae86ca93e4907c27292b443e3bbbd3067 | |
| parent | 704677257ecb01c7ee10aa0dfc55ca1d4fc4636d (diff) | |
[ruby/json] Fix sliced string escaping
https://github.com/ruby/json/commit/d7baf015d9
| -rw-r--r-- | test/json/json_encoding_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/json/json_encoding_test.rb b/test/json/json_encoding_test.rb index 8dce81da59..2789e94b5b 100644 --- a/test/json/json_encoding_test.rb +++ b/test/json/json_encoding_test.rb @@ -35,6 +35,8 @@ class JSONEncodingTest < Test::Unit::TestCase # Ref: https://github.com/ruby/json/issues/859 s = "01234567890" assert_equal '"234567890"', JSON.dump(s[2..-1]) + s = '01234567890123456789"a"b"c"d"e"f"g"h' + assert_equal '"\"a\"b\"c\"d\"e\"f\"g\""', JSON.dump(s[20, 15]) end def test_unicode |
