Project

General

Profile

Actions

Bug #20246

closed

Unexpected behavior for Regexp in Subexpression Calls on Ruby 3.3.0

Bug #20246: Unexpected behavior for Regexp in Subexpression Calls on Ruby 3.3.0

Added by bestwebua (Vladislav Trotsenko) almost 2 years ago. Updated over 1 year 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 

Related issues 1 (0 open1 closed)

Actions

Also available in: PDF Atom