From: Sam Ruby Date: 2008-01-29T06:29:47+09:00 Subject: Re: Is "Regexp#ascii_only?" needed? Sam Ruby wrote: > Note the warning message in the following: > > $ irb > irb(main):001:0> RUBY_DESCRIPTION > => "ruby 1.9.0 (2008-01-29 revision 15303) [i686-linux]" > irb(main):002:0> "\u00A0" =~ /\s/ > (irb):2: warning: regexp match /.../n against to UTF-8 string > => 0 > irb(main):003:0> As of revision 15304, this no longer is an issue as the warning is no longer issued. Thanks! > It also appears that Regexp.new behaves differently: > > $ irb > irb(main):001:0> RUBY_DESCRIPTION > => "ruby 1.9.0 (2008-01-29 revision 15303) [i686-linux]" > irb(main):002:0> /\s/mu.encoding > => # > irb(main):003:0> Regexp.new('\s',Regexp::MULTILINE,'u').encoding > => # These encodings remain different. - Sam Ruby