Project

General

Profile

Actions

Bug #20246

closed

Unexpected behavior for Regexp in Subexpression Calls on Ruby 3.3.0

Added by bestwebua (Vladislav Trotsenko) 3 months ago. Updated about 2 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin22]
[ruby-core:116627]

Description

Hello! A few days ago, after migration on 3.3.0 I have faced with issue inside subexpression calls.

An expected result on Ruby up to 3.3.0:

'1.2.3'[/(\d+)(\.\g<1>){2}/] # => "1.2.3"

An actual result on Ruby 3.3.0:

'1.2.3'[/(\d+)(\.\g<1>){2}/] # => nil
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0