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.
Actions
Like0
Like0Like0Like0Like0Like0