Project

General

Profile

Actions

Bug #647

closed

Source encoding not applied to 7-bit regular expressions

Added by pragdave (Dave Thomas) over 15 years ago. Updated almost 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:19337]

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

Actions #1

Updated by naruse (Yui NARUSE) over 15 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

Actions #2

Updated by matz (Yukihiro Matsumoto) over 15 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

Also available in: Atom PDF

Like0
Like0Like0