From: merch-redmine@... Date: 2021-05-12T21:40:17+00:00 Subject: [ruby-core:103807] [Ruby master Bug#14367] Wrong interpretation of backslash C in regexp literals Issue #14367 has been updated by jeremyevans0 (Jeremy Evans). The behavior appears not to be intentional. This is a bug related to the fact that Ruby uses a recursive algorithm for strings (read_escape) but not for regexps (tokadd_escape). I've submitted a pull request to have control/meta handling for regexps use the same recursive algorithm used for strings, which fixes this issue: https://github.com/ruby/ruby/pull/4495 ---------------------------------------- Bug #14367: Wrong interpretation of backslash C in regexp literals https://bugs.ruby-lang.org/issues/14367#change-91922 * Author: shyouhei (Shyouhei Urabe) * Status: Open * Priority: Normal * ruby -v: ruby 2.6.0dev (2018-01-16 trunk 61875) [x86_64-darwin15] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- Following ruby code returns nil. ```sh % LC_ALL=C ruby -ve 'p(/\c\xFF/ =~ "\c\xFF")' ruby 2.6.0dev (2018-01-16 trunk 61875) [x86_64-darwin15] nil ``` Is this intentional? -- https://bugs.ruby-lang.org/ Unsubscribe: