Actions
Bug #647
closedSource encoding not applied to 7-bit regular expressions
Description
=begin
encoding: utf-8¶
"cat".encoding # => #Encoding:UTF-8
"δδδ".encoding # => #Encoding:UTF-8
/cat/.encoding # => #Encoding:US-ASCII # <<<<
:δδδ.encoding # => #Encoding:UTF-8
I was expecting the regular expression to be encoded the same way a
string is.
Matz: Yes, it's a bug. Thank you.
=end
Updated by naruse (Yui NARUSE) over 16 years ago
=begin
memo:
If source encoding applied to 7-bit regular expressions,
we need Regexp#ascii_only? and special treatment in Encoding.compatible?.
=end
Updated by matz (Yukihiro Matsumoto) over 16 years ago
- Category set to M17N
- Status changed from Open to Rejected
=begin
It turns out not to be a bug. See [ruby-core:19344].
=end
Actions
Like0
Like0Like0