[ruby-core:98181] [Ruby master Bug#14367] Wrong interpretation of backslash C in regexp literals
From:
naruse@...
Date:
2020-05-07 09:01:54 UTC
List:
ruby-core #98181
Issue #14367 has been updated by naruse (Yui NARUSE). It looks inconsistency handling between regexp and Ruby's for `\c\xff`: ``` % LC_ALL=C ruby -ve 'p (/\c\xff/ =~ "\x1f")' ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18] 0 ``` ---------------------------------------- Bug #14367: Wrong interpretation of backslash C in regexp literals https://bugs.ruby-lang.org/issues/14367#change-85421 * 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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>