Issue #20246 has been updated by naruse (Yui NARUSE).
Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: REQUIRED to 3.0:
UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: DONE
ruby_3_3 05787897f69087abdabee926971cdf364bd73730 merged revision(s)
18ee7c9a108bf3424814565377c8796e5e455cf7,4a6384ed9358e8fb8464f6e37efb5477182f01db.
----------------------------------------
Bug #20246: Unexpected behavior for Regexp in Subexpression Calls on Ruby 3.3.0
https://bugs.ruby-lang.org/issues/20246#change-107399
* Author: bestwebua (Vladislav Trotsenko)
* Status: Closed
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin22]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: DONE
----------------------------------------
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:
```ruby
'1.2.3'[/(\d+)(\.\g<1>){2}/] # => "1.2.3"
```
An actual result on Ruby 3.3.0:
```ruby
'1.2.3'[/(\d+)(\.\g<1>){2}/] # => nil
```
--
https://bugs.ruby-lang.org/