Actions
Bug #10670
closedchar-class matching same character with different encodings raises exception
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
Description
The following simple script illustrates the issue:
ESCAPE_PLAIN = /\A[\x5B]*\z/m.freeze
0x5B.chr(::Encoding::UTF_8) =~ ESCAPE_PLAIN
0x5B.chr =~ ESCAPE_PLAIN
\x5B
is ']'
, run all lines above and get in `=~': empty char-class: /\A[\x5B]*\z/m (RegexpError)
Comment out either the first or second usage and the error goes away.
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Related to Bug #10382: s = '\x80'; /#{s}/ raises an exception in US-ASCII script added
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Description updated (diff)
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r49058.
re.c: append excape sequence as-is
- re.c (unescape_nonascii): append excape sequence as-is not
unescaped character, to get rid of unexpected meta-character.
[ruby-core:67193] [Bug #10670]
Updated by naruse (Yui NARUSE) almost 10 years ago
- Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE
ruby_2_2 r49264 merged revision(s) 49058.
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Has duplicate Bug #10733: Time.httpdate raises ArgumentError when DateTime.now.httpdate is provided as input added
Actions
Like0
Like0Like0Like0Like0Like0