From: "steviejj (Steven Johnstone) via ruby-core" Date: 2026-12-02T18:26:25+00:00 Subject: [ruby-core:127802] [Ruby Bug#22705] parse.y: regx_options fails to clear kcode when n overrides an earlier encoding option (/sn) Issue #22705 has been reported by steviejj (Steven Johnstone). ---------------------------------------- Bug #22705: parse.y: regx_options fails to clear kcode when n overrides an earlier encoding option (/sn) https://bugs.ruby-lang.org/issues/22705 * Author: steviejj (Steven Johnstone) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ```ruby # coding: binary / #{"\xcd"}/sn ``` - parse.y: `SyntaxError: regexp encoding option 's' differs from source encoding 'ASCII-8BIT'`. - prism: `Syntax OK` (exits 0; static `/\xcd/sn` is accepted by both parsers). -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/