From: Yukihiro Matsumoto Date: 2008-10-15T23:37:25+09:00 Subject: [ruby-core:19344] Re: Can I confirm a change to source file encoding Hi, In message "Re: [ruby-core:19336] Re: Can I confirm a change to source file encoding" on Wed, 15 Oct 2008 05:44:05 +0900, Yukihiro Matsumoto writes: |In message "Re: [ruby-core:19334] Re: Can I confirm a change to source file encoding" | on Wed, 15 Oct 2008 03:35:17 +0900, Dave Thomas writes: | ||Should I report the following as a bug? || ||# encoding: utf-8 ||"cat".encoding # => # ||"δδδ".encoding # => # ||/cat/.encoding # => # ||:δδδ.encoding # => # || ||I was expecting the regular expression to be encoded the same way a ||string is. | |Yes, it's a bug. Thank you. Although I thought it was a feature bug against consistency, it found out to be a spec to make regular expression work well under mixed encoding circumstances, after struggling for a whole day. So regular expressions that contain only 7bit characters reports US-ASCII for their encoding, at least during the 1.9 era. matz.