Skip to content

Fix the parser to not accept invalid escapes #1402

Fix the parser to not accept invalid escapes

Fix the parser to not accept invalid escapes #1402

Triggered via pull request November 22, 2025 12:05
Status Failure
Total duration 2m 10s
Artifacts

ci.yml

on: pull_request
ruby-versions  /  Generate Ruby versions
3s
ruby-versions / Generate Ruby versions
Ruby memcheck
37s
Ruby memcheck
Matrix: host
Fit to window
Zoom out
Zoom in

Annotations

107 errors and 1 notice
macos-14 3.0
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 3.4
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 3.3
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.2
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.4 JSON_DISABLE_SIMD=1
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 3.1
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 head
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 3.2
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.4 JSON_DEBUG=1
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.4
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.1
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.0
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-24.04-arm 3.4
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest head
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 3.3
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest 2.7
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 2.7
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
Ruby memcheck
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-13 3.4
Process completed with exit code 1.
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-latest truffleruby-head
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <["\b(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? ^^ + ["\b(?i:gif|jpe?g|png)$"] ? ^
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-14 jruby
Process completed with exit code 1.
macos-latest jruby-9.4
Process completed with exit code 1.
macos-14 jruby-head
Process completed with exit code 1.
ubuntu-latest truffleruby-head
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
ubuntu-latest jruby-9.4
Process completed with exit code 1.
ubuntu-latest jruby-head
Process completed with exit code 1.
ubuntu-latest jruby
Process completed with exit code 1.
windows-latest 3.4
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest 3.3
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest mswin
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Error: test/json/json_parser_test.rb#L499
JSON::ParserError: incomplete unicode character escape sequence at '\.(?i:gif|jpe?g|png)$"]' at line 1 column 4 D:/a/json/json/lib/json/common.rb:353:in 'JSON::Ext::Parser.parse' D:/a/json/json/lib/json/common.rb:353:in 'JSON#parse' D:/a/json/json/test/json/json_parser_test.rb:499:in 'JSONParserTest#test_backslash'
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest 3.1
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest 3.0
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest head
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest 3.2
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
windows-latest jruby-head
Process completed with exit code 1.
windows-latest 2.7
Process completed with exit code 1.
Failure: test/json/json_parser_test.rb#L289
<["\\"]> expected but was <[""]>. diff: - ["\\"] ? -- + [""]
Failure: test/json/json_parser_test.rb#L499
<["\\.(?i:gif|jpe?g|png)$"]> expected but was <[".(?i:gif|jpe?g|png)$"]>. diff: - ["\\.(?i:gif|jpe?g|png)$"] ? -- + [".(?i:gif|jpe?g|png)$"]
Failure: test/json/json_encoding_test.rb#L186
<"\\"> expected but was <"">.
macos-13 3.4
The macOS-13 based runner images are being deprecated, consider switching to macOS-15 (macos-15-intel) or macOS 15 arm64 (macos-latest) instead. For more details see https://github.com/actions/runner-images/issues/13046