Project

General

Profile

Actions

Bug #22103

closed

Constant-folded /o regexp crashes with dupstring of a Regexp

Bug #22103: Constant-folded /o regexp crashes with dupstring of a Regexp

Added by shugo (Shugo Maeda) 4 days ago. Updated 2 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:125692]

Description

A /o (once) regexp whose interpolation folds to a constant crashes at runtime:

def m; /#{"a"}/o; end
m   #=> [BUG] heap_idx_for_size: allocation size too large

A plain /#{"a"}/ (no /o) is fine.

Actions

Also available in: PDF Atom