Project

General

Profile

Bug #13024

Confusing error message matching a non-ASCII string with ASCII-regex

Added by herwin (Herwin W) almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:78592]

Description

irb(main):001:0> "\u2603".match(/./n)
(irb):1: warning: regexp match /.../n against to UTF-8 string
=> #<MatchData "☃">

I actually had to read the source to discover the intention of this error (partly because I copied the /n from somewhere without knowing what it meant). Replacing "against to" with just "against" would improve the grammar (full disclosure: English isn't my native language either, I'm open to other suggestions here).

Associated revisions

Revision dbd4c4a7
Added by akr (Akira Tanaka) over 2 years ago

refine warning message for binary regexp /.../n.

Reported by Herwin W. [ruby-core:78592] [Bug #13024]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 57684
Added by akr (Akira Tanaka) over 2 years ago

refine warning message for binary regexp /.../n.

Reported by Herwin W. [ruby-core:78592] [Bug #13024]

Revision 57684
Added by akr (Akira Tanaka) over 2 years ago

refine warning message for binary regexp /.../n.

Reported by Herwin W. [ruby-core:78592] [Bug #13024]

Revision 57684
Added by akr (Akira Tanaka) over 2 years ago

refine warning message for binary regexp /.../n.

Reported by Herwin W. [ruby-core:78592] [Bug #13024]

History

Updated by naruse (Yui NARUSE) almost 3 years ago

Hmm, maybe the error message express /.../n is ASCII-8BIT (binary) regexp...

#2

Updated by akr (Akira Tanaka) over 2 years ago

  • Status changed from Open to Closed

Applied in changeset r57684.


refine warning message for binary regexp /.../n.

Reported by Herwin W. [ruby-core:78592] [Bug #13024]

Also available in: Atom PDF