Skip to content

Raise parse error on invalid comments#734

Merged
byroot merged 1 commit intoruby:masterfrom
tompng:error_on_invalid_comments
Jan 20, 2025
Merged

Raise parse error on invalid comments#734
byroot merged 1 commit intoruby:masterfrom
tompng:error_on_invalid_comments

Conversation

@tompng
Copy link
Member

@tompng tompng commented Jan 20, 2025

Fix parsing these invalid json

JSON.parse '1 /*aaa' # => 1, should be error
JSON.parse '1 /' # => never stops
JSON.parse '[1, /' # => never stops

Copy link
Member

@byroot byroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@byroot byroot merged commit 96079a1 into ruby:master Jan 20, 2025
33 checks passed
@tompng tompng deleted the error_on_invalid_comments branch January 20, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants