Project

General

Profile

Actions

Bug #13024

closed

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

Added by herwin (Herwin W) over 7 years ago. Updated about 7 years ago.

Status:
Closed
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).

Actions

Also available in: Atom PDF

Like0
Like0Like0