Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON.dump: avoid redundant UTF-8 validation #595

Merged
merged 1 commit into from
Oct 3, 2024

Commits on Sep 2, 2024

  1. JSON.dump: avoid redundant UTF-8 validation

    Given that we called `rb_enc_str_asciionly_p`, if the string encoding
    isn't valid UTF-8, we can't know it very cheaply by checking the
    encoding and coderange that was just computed by Ruby, rather than
    to do it ourselves.
    
    Also Ruby might have already computed that earlier.
    byroot committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    4b04c46 View commit details
    Browse the repository at this point in the history