We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2074f0c commit 2fc3c61Copy full SHA for 2fc3c61
1 file changed
test/json/json_parser_test.rb
@@ -673,6 +673,13 @@ def test_parse_leading_slash
673
end
674
675
676
+ def test_parse_malformated_unicode_escapes
677
+ assert_equal "�|", JSON.parse('"\\u1gef|"')
678
+ assert_equal "�|", JSON.parse('"\\u12ge|"')
679
+ assert_equal "�|", JSON.parse('"\\u123g|"')
680
+ assert_equal '�\\\\"', JSON.parse('"\\u1\\\\\\\\\\\\\\\\"')
681
+ end
682
+
683
private
684
685
def string_deduplication_available?
0 commit comments