Project

General

Profile

Actions

Bug #20030

closed

`Ripper.tokenize('"\\C-あ"')` separates encoding valid string to encoding invalid string.

Added by tompng (tomoya ishida) 12 months ago. Updated 4 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0dev (2023-11-30T16:23:25Z master d048bae96b) [x86_64-linux]
Backport:
[ruby-core:115549]

Description

Ripper.tokenize '"\\C-あ"' # or Ripper.tokenize "\"\\C-\u3042\""
# =>
["\"", "\x81", "\x82", "\""]

I expect all tokens to be valid_encoding if the source string is valid_encoding.

This is causing IRB crash when typing "\C-あ".

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0