Bug #563: Regexp::escape is not Encoding Aware
http://redmine.ruby-lang.org/issues/show/563

Author: James Gray
Status: Open, Priority: Normal
Category: M17N

Escaping an encoded String can damage the encoding:

>> s = "+"
=> "+"
>> s.encode!("UTF-16BE")
=> "\x00+"
>> re = Regexp.escape(s)
=> "\\+"
>> re.encoding
=> #<Encoding:UTF-16BE>


----------------------------------------
http://redmine.ruby-lang.org