Project

General

Profile

Actions

Bug #18294

closed

error when parsing regexp comment

Added by thyresias (Thierry Lambert) about 3 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [i386-mingw32]
[ruby-core:105972]

Description

The following code generates the error "too short escaped multibyte character"

_re = /
  foo  # \M-ca
/x

Removing the \ or doubling it makes the error disappear.
Since this is in comment text, I would expect to be able to type anything there: am I missing something?


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #19750: Ruby hangs when parsing Regexp with unterminated unicode "/\u{"Closedjeremyevans0 (Jeremy Evans)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0