From: "drbrain (Eric Hodel)" Date: 2012-12-15T10:53:54+09:00 Subject: [ruby-core:50910] [ruby-trunk - Bug #7566] Escape (\u{}) forms in Regexp literals Issue #7566 has been updated by drbrain (Eric Hodel). Category set to core Target version set to 2.0.0 =begin Converting any of the regexp special characters could cause a syntax error or warning if the user tries to round-trip the regexp, so I think this is not a bug: $ ruby20 -ve 'p("\u{5d}", /[\u{5d}]/)' ruby 2.0.0dev (2012-12-15 trunk 38385) [x86_64-darwin12.2.1] "]" /[\u{5d}]/ $ ruby20 -ve 'p(/[]]/)' ruby 2.0.0dev (2012-12-15 trunk 38385) [x86_64-darwin12.2.1] -e:1: warning: character class has ']' without escape: /[]]/ /[]]/ =end ---------------------------------------- Bug #7566: Escape (\u{}) forms in Regexp literals https://bugs.ruby-lang.org/issues/7566#change-34757 Author: brixen (Brian Ford) Status: Open Priority: Normal Assignee: Category: core Target version: 2.0.0 ruby -v: ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin10.8.0] Why are \u{} escape sequences in Regexp literals not converted to bytes like they are in String literals? https://gist.github.com/4290155 Thanks, Brian -- http://bugs.ruby-lang.org/