Skip to content

Fix failures on non-UTF-8 environments - #1121

Merged
nobu merged 1 commit into
ruby:masterfrom
nobu:fix-encoding-in-test
Nov 3, 2026
Merged

nobu merged 1 commit into
ruby:masterfrom
nobu:fix-encoding-in-test

Conversation

@nobu

@nobu nobu commented Nov 3, 2026

Copy link
Copy Markdown
Member
    1) Failure:
  JSONGeneratorTest#test_rfc8785_values [/__w/ruby/ruby/src/test/json/json_generator_test.rb:1498]:
  <"{\"literals\":[null,true,false],\"numbers\":[333333333.3333333,1e+30,4.5,0.002,1e-27],\"string\":\"\xE2\x82\xAC$\\u000f\\nA'B\\\"\\\\\\\\\\\"/\"}"> expected but was
  <"{\"literals\":[null,true,false],\"numbers\":[333333333.3333333,1e+30,4.5,0.002,1e-27],\"string\":\"\u20AC$\\u000f\\nA'B\\\"\\\\\\\\\\\"/\"}">.
  
    2) Failure:
  JSONGeneratorTest#test_rfc8785_unicode [/__w/ruby/ruby/src/test/json/json_generator_test.rb:1498]:
  <"{\"Unnormalized Unicode\":\"A\xCC\x8A\"}"> expected but was
  <"{\"Unnormalized Unicode\":\"A\u030A\"}">.
  
    3) Failure:
  JSONGeneratorTest#test_rfc8785_wierd [/__w/ruby/ruby/src/test/json/json_generator_test.rb:1498]:
  <"{\"\\n\":\"Newline\",\"\\r\":\"Carriage Return\",\"1\":\"One\",\"</script>\":\"Browser Challenge\",\"\xC2\x80\":\"Control\x7F\",\"\xC3\xB6\":\"Latin Small Letter O With Diaeresis\",\"\xE2\x82\xAC\":\"Euro Sign\",\"\xF0\x9F\x98\x82\":\"Smiley\",\"\xEF\xAC\xB3\":\"Hebrew Letter Dalet With Dagesh\"}"> expected but was
  <"{\"\\n\":\"Newline\",\"\\r\":\"Carriage Return\",\"1\":\"One\",\"</script>\":\"Browser Challenge\",\"\u0080\":\"Control\u007F\",\"\u00F6\":\"Latin Small Letter O With Diaeresis\",\"\u20AC\":\"Euro Sign\",\"\u{1F602}\":\"Smiley\",\"\uFB33\":\"Hebrew Letter Dalet With Dagesh\"}">.
  
    4) Failure:
  JSONGeneratorTest#test_rfc8785_french [/__w/ruby/ruby/src/test/json/json_generator_test.rb:1498]:
  <"{\"peach\":\"This sorting order\",\"p\xC3\xA9ch\xC3\xA9\":\"is wrong according to French\",\"p\xC3\xAAche\":\"but canonicalization MUST\",\"sin\":\"ignore locale\"}"> expected but was
  <"{\"peach\":\"This sorting order\",\"p\u00E9ch\u00E9\":\"is wrong according to French\",\"p\u00EAche\":\"but canonicalization MUST\",\"sin\":\"ignore locale\"}">.

@nobu
nobu merged commit 1c67ef2 into ruby:master Nov 3, 2026
42 checks passed
@nobu
nobu deleted the fix-encoding-in-test branch November 3, 2026 02:57
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.

1 participant